我相当新Oauth2.0。
我想开始使用Google Plus API。SSL需要使用谷歌加API吗?
我用下面的资源
“Using OAuth 2.0 to Access Google APIs” 文档。
Google Plus Oauth Api范围键 (https://www.googleapis.com/auth/plus.me)。
玩过卷曲并与其他“范围键”成功后。我遇到了以下谷歌加范围错误(https://www.googleapis.com/auth/plus.me)。
“令牌无效 - AuthSub凭证有错误的范围”
然后我找到了解决办法Google’s OAuth Pain: Token invalid – AuthSub token has wrong scope
它指出以下:
如果你得到一个当您尝试使用OAuth(或甚至AuthSub的)时,“令牌无效 - AuthSub令牌有错误的范围” 错误10事?),请确保您正在使用相同的协议 请求为您正在使用
我做了什么,他说的范围,采取了“S”关范围“
http://www.googleapis.com/auth/plus.me
但现在它给了我这个错误
这是否意味着你的网站必须使用SSL?
感谢您的反馈。
编辑:原来我用错了API
应该https://www.googleapis.com/plus/v1/people/me?access_token=xxxx
借助Google+ API,终点是什么? '的https:// www.googleapis.com /加/ V1 /'。 Google的OAuth2授权终端为“https:// accounts.google.com/o/oauth2/auth”。我没有在任何地方看到任何非HTTPS URI。 – dtb
是的,如上所述,使用HTTPS版本导致“令牌无效 - AuthSub令牌有错误的范围” – Bodman
您是否可以添加重现问题的步骤? – dtb