【发布时间】:2017-04-20 06:36:54
【问题描述】:
尝试通过 Google Drive 的 API V3 向文件添加权限时,我遇到了以下错误。我想允许来自我的站点 mta.io 的请求能够读取该文件。该错误似乎来自我在请求正文中传递的域,例如 example.com 工作正常并授予它权限。我是否需要将我的域列入白名单才能授予它对该文件的权限?
作品:
{
"role": "reader",
"type": "domain",
"domain": "example.com"
}
不起作用:
{
"role": "reader",
"type": "domain",
"domain": "mta.io"
}
错误:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalid",
"message": "The specified domain is invalid or not applicable for the given permission type.",
"locationType": "other",
"location": "permission.domain"
}
],
"code": 400,
"message": "The specified domain is invalid or not applicable for the given permission type."
}
}
我正在使用 API 网站上的 try it 功能。
【问题讨论】:
标签: javascript google-drive-api file-permissions