1

我建立後端與移動客戶端Django框架和我以前python-social-auth您註冊用戶和它的工作原理爲FacebookTwitter但未能爲google-oauth2,並出現以下錯誤:蟒蛇 - 社會 - 身份驗證不能使用GoogleOAuth2

 {"detail":"{\n \"error\": {\n \"errors\": [\n {\n \"domain\": \"usageLimits\", 
    \n \"reason\": \"dailyLimitExceededUnreg\", 
\n \"message\": \"Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.\", 
\n \"extendedHelp\": \"https://code.google.com/apis/console\"\n }\n ], 
\n \"code\": 403, 
\n \"message\": \"Daily Limit for Unaut henticated Use Exceeded. Continued use requires signup.\"\n }\n}\n"} 

我調試谷歌後臺源代碼包的社會,我發現它失敗了return聲明:

return self.get_json(url, params={ 'access_token': access_token, 'alt': 'json' }) 

我不知道爲什麼會失敗, Ÿ幫助解決這個問題表示讚賞。

+1

可能重複的[GoogleAuthUtil:每日限制未經驗證的使用超過](http://stackoverflow.com/questions/13078588/googleauthutil-daily-limit-for-unauthenticated-use-exceeded) – Armfoot

+0

@Armfoot是的,我有同樣的錯誤http://stackoverflow.com/questions/13078588/googleauthutil-daily-limit-for-unauthenticated-use-exceeded但它是關於java或可能android使用google-oauth和在我的情況下,我用蟒蛇社會包,所以他的 解決方案不適合我的情況 – angel

+0

天使,從[在該問題的答案](http:// stackoverflow .com/a/13078826/1326147),google-oauth基於GoogleCredential,我相信你的問題是相似的:你的access_token是無效的或者它不是'正確使用。你用來定義它的代碼將有助於解決你的問題。 – Armfoot

回答

1

首先感謝大家的幫助。 最後我發現問題是由於使用不良的訪問令牌。我使用這個鏈接http://developers.google.com/oauthplayground,我選擇谷歌+在谷歌API列表和生成密鑰後,我交換它與訪問令牌獲取我的谷歌+訪問令牌,它的作用就像一個魅力,當我在我的python視圖url上運行卷曲commande。 如果有人有同樣的問題,需要更多的幫助,它可以問我,我會解釋更多...

相關問題