我相當新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