G Suite Drive API:为什么我无法获取特定文件的权限?
G Suite Drive API: Why can't I get the permissions of a specific file?
我正在使用 G Suite Drive API 中的数据,但出现以下错误:
[2020-05-09 05:42:33,626: INFO/ForkPoolWorker-1] URL being requested: GET https://www.googleapis.com/drive/v3/files/<FILE_ID>/permissions?fields=%2A&alt=json
[2020-05-09 05:42:34,089: WARNING/ForkPoolWorker-1] Encountered 403 Forbidden with reason "insufficientFilePermissions"
[2020-05-09 05:42:34,089: WARNING/ForkPoolWorker-1] drive#permission: HTTP error (code 403): The user does not have sufficient permissions for this file.
导致问题的文件是 JPEG。我有文件 ID 和文件名。
情况如下:
- 当使用 Drive Files API 查找文件并提供文件 ID 时,将返回 200 HTTP 响应。
- 使用 Drive Permissions API 查找文件权限时,出现 403 HTTP 错误。
- 使用云端硬盘搜索栏查找文件并提供文件名时,未找到任何内容。
任何人都可以阐明这一点吗?
感谢您的宝贵时间。
403 Forbidden with reason "insufficientFilePermissions"
表示您无权做您想做的事
permissions.get 要求执行操作的用户已通过以下范围之一进行身份验证
如果您更改应用程序中的范围,请记住您需要再次 运行 应用程序,以便它请求用户同意以获得新的同意。
如果您的权限允许您使用 Files: get but not Permissions: list,您只有文件的查看权限
您需要成为编辑者或所有者才能使用 Permissions:list
我正在使用 G Suite Drive API 中的数据,但出现以下错误:
[2020-05-09 05:42:33,626: INFO/ForkPoolWorker-1] URL being requested: GET https://www.googleapis.com/drive/v3/files/<FILE_ID>/permissions?fields=%2A&alt=json
[2020-05-09 05:42:34,089: WARNING/ForkPoolWorker-1] Encountered 403 Forbidden with reason "insufficientFilePermissions"
[2020-05-09 05:42:34,089: WARNING/ForkPoolWorker-1] drive#permission: HTTP error (code 403): The user does not have sufficient permissions for this file.
导致问题的文件是 JPEG。我有文件 ID 和文件名。
情况如下:
- 当使用 Drive Files API 查找文件并提供文件 ID 时,将返回 200 HTTP 响应。
- 使用 Drive Permissions API 查找文件权限时,出现 403 HTTP 错误。
- 使用云端硬盘搜索栏查找文件并提供文件名时,未找到任何内容。
任何人都可以阐明这一点吗?
感谢您的宝贵时间。
403 Forbidden with reason "insufficientFilePermissions"
表示您无权做您想做的事
permissions.get 要求执行操作的用户已通过以下范围之一进行身份验证
如果您更改应用程序中的范围,请记住您需要再次 运行 应用程序,以便它请求用户同意以获得新的同意。
如果您的权限允许您使用 Files: get but not Permissions: list,您只有文件的查看权限
您需要成为编辑者或所有者才能使用 Permissions:list