谷歌任务api身份验证问题

时间:2015-07-29 13:39:38

标签: php google-api

我在PHP脚本中使用Google日历API来获取即将发生的事件列表。我正在使用一个运作良好的服务帐户。

现在我还想调用Tasks API,它在身份验证方面表现不同。

适用于Calendar API的凭据:

$credentials = new Google_Auth_AssertionCredentials($client_email, $scopes, $private_key, 'notasecret','http://oauth.net/grant_type/jwt/1.0/bearer', 'example@gmail.com');

我可以为用户提供所有活动' example@gmail.com'这条路。当我将这些凭据用于Tasks API时,我得到了这个:

  

"错误" :" unauthorized_client"," error_description" :"请求中未经授权的客户或范围。"

如果我删除了我想查询的用户,' example@gmail.com'在这个例子中,我可以查询服务帐户的任务,这不是我想要的。

有什么建议吗?

0 个答案:

没有答案