我试图获取给定用户的圈子列表,我得到了一个好的access_token,我在这里测试了这个:
https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=
输出:
"issued_to": "xyz.apps.googleusercontent.com",
"audience": "xyz.apps.googleusercontent.com",
"user_id": "xyz",
"scope": "https://www.googleapis.com/auth/plus.me
https://www.googleapis.com/auth/plus.circles.read",
"expires_in": 2816,
"access_type": "online"
我将以下标题发送到https://www.googleapis.com/plusDomains/v1/people/me/circles
Array ( [0] => Authorization: Bearer accesscode
[1] => Content-length: 0
[2] => Content-type: application/json )
返回:
Array ( [0] => { "error": {
"errors": [ { "domain": "global", "reason": "forbidden", "message": "Forbidden" } ],
"code": 403, "message": "Forbidden" } } )
好像它认为我已经授权应用程序访问我的谷歌帐户,但是第一次运行它时我被提示允许访问,访问令牌验证输出表明它具有正确的权限范围。
非常感谢任何有关如何解决此问题的建议!
干杯
萨姆