试图通过Google Drive的API V3向文件添加权限,我遇到了下面的错误。我想允许来自我的网站mta.io的请求读取文件。例如,错误似乎来自我在请求主体中传递的域,example.com工作正常,授予权限。我是否需要将我的网域列入白名单才能授予其文件权限?Google Drive API V3:为域创建文件权限
作品:
{
"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功能。