【发布时间】:2015-04-14 14:52:24
【问题描述】:
我一直在使用 Google Drive API 以编程方式创建和共享文档。昨天我开始收到这个错误消息,每次请求插入权限:
com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "usageLimits",
"location" : "user.sharing",
"locationType" : "other",
"message" : "Rate limit exceeded. User message: \"Sorry, you have exceeded your sharing quota.\"",
"reason" : "userRateLimitExceeded"
} ],
"message" : "Rate limit exceeded. User message: \"Sorry, you have exceeded your sharing quota.\""
}
我仍然可以以编程方式创建文档,但插入权限的请求总是失败。
这是通过服务帐户完成的,其想法是服务帐户将为应用程序管理这些文档并根据需要与授权用户共享。
在插入大约 50-100 个权限后开始出现错误。我做了一些研究,听起来 Google Drive API 中可能有一个“功能”,它限制了可以插入的权限数量。有没有办法绕过这个限制?
更新:
为了记录,我每天可以创建 51 个权限。创建第 52 个权限在 24 小时内总是失败。不幸的是,此限制使权限 API 对服务帐户完全无用。
【问题讨论】:
标签: google-drive-api