【发布时间】:2015-07-23 18:01:27
【问题描述】:
在开发者控制台中为特定应用用户(例如 user@mydomain.com)创建的服务帐户是否有权访问应用用户的文档?如果我像这样在AssertionCredentials() 中设置帐户:
$credentials = new Google_Auth_AssertionCredentials(...);
$credentials->sub = "user@mydomain.com";
我收到以下错误:
PHP Fatal error:
Uncaught exception 'Google_Auth_Exception' with message
'Error refreshing the OAuth2 token, message:'{
"error" : "unauthorized_client",
"error_description" : "Unauthorized client or scope in request."
}
当我没有设置$credentials->sub = "user@mydomain.com" 时,我可以访问驱动器,但我只看到一个文档“如何开始使用驱动器”。
如果我在服务帐户上创建文档,是否可以在不启用域范围委派的情况下将文档的所有权转移到我的应用帐户?
【问题讨论】:
标签: php google-drive-api