python-social-auth can't use GoogleOAuth2

465 views Asked by At

I built the backend with Django framework for mobile client and I used python-social-auth for signing up users and it works for Facebook and Twitter but fails for google-oauth2, with the following error:

     {"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"} 

I debugged google backend source code in social package and I found it failed on return statement:

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

I don't know why it fails, Any help in fixing this issue is appreciated.

1

There are 1 answers

0
angel On BEST ANSWER

First thank all for your help. That finally I found issue was due to the use of bad access token. i use this link http://developers.google.com/oauthplayground and i choose google+ in google api list and after generate key i exchanged it with access token for get my google+ access token and it works like a charm when i run curl commande on my python view url. if someone have the same issue and need more help it can ask me i will explain more...