我对 Oauth2.0 相当陌生。
我想开始使用 Google Plus api。
我使用了以下资源
“使用 OAuth 2.0 访问 Google API ”文档。
Google Plus Oauth Api范围密钥 ( https://www.googleapis.com/auth/plus.me )。
在使用 curl 并使用其他“范围键”取得成功之后。我在 google plus 范围 ( https://www.googleapis.com/auth/plus.me ) 中遇到了以下错误。
“令牌无效 - AuthSub 令牌范围错误”
然后我找到了解决方案Google's OAuth Pain: Token invalid – AuthSub token has wrong scope
它指出了以下几点:
如果您在尝试使用 OAuth(或什至 AuthSub ?)时收到“令牌无效 – AuthSub 令牌的范围错误”错误,请确保您请求的范围使用与您相同的协议'正在使用
我照他说的做了,把“s”从范围中去掉了“
http://www.googleapis.com/auth/plus.me
但现在它给了我这个错误
这是否意味着您的网站必须使用 SSL?
感谢您的反馈。
编辑:原来我使用了错误的 api
应该是https://www.googleapis.com/plus/v1/people/me?access_token=xxxx