HTTPError 403 (Forbidden) with Django and python-social-auth connecting to Google with OAuth2

damio picture damio · Jun 24, 2014 · Viewed 13.1k times · Source

Using python-social-auth, I get a 403: Forbiden error message after accepting access from google

EDIT: I've recently (2017) had the same error but under a new message: 401 Client Error: Unauthorized for url: https://accounts.google.com/o/oauth2/token

Answer

damio picture damio · Jun 24, 2014

This answer is outdated as the Google+ API is being deprecated on 3/7/19

You need to add the Google+ API to the list of enabled APIs on the Google Developer Console (under APIs)

Note: If you want to see the real error message, use the traceback to look at the content of the response variable (response.text). I use werkzeug for that (django-extensions + python manage.py runserver_plus).