我正在进行一个项目,该项目使用谷歌驱动api下载文件。我使用的服务帐户具有所有驱动器权限(https://www.googleapis.com/auth/drive
(。
我可以下载一些文件没有任何问题,但有时我会得到以下错误:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "insufficientFilePermissions",
"message": "The user does not have sufficient permissions for this file."
}
],
"code": 403,
"message": "The user does not have sufficient permissions for this file."
}
}
当我试图下载一个文件时,我会冒充该文件的所有者。该文件的所有者肯定有权访问该文件,所以我不确定为什么会出现此错误。
有人能解释我怎么会犯这个错误吗?
问题是我试图模拟的用户已挂起。