Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oauthlib.oauth2.rfc6749.errors.MissingCodeError: (missing_code) Missing code parameter in response #370

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs/examples/google.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ a callback URL then you can try out the command line interactive example below.
>>> client_id = '<the id you get from google>.apps.googleusercontent.com'
>>> client_secret = '<the secret you get from google>'
>>> redirect_uri = 'https://your.registered/callback'


# just for development !!!
>>> os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1'

>>> # OAuth endpoints given in the Google API documentation
>>> authorization_base_url = "https://accounts.google.com/o/oauth2/v2/auth"
>>> token_url = "https://www.googleapis.com/oauth2/v4/token"
Expand All @@ -37,7 +40,7 @@ a callback URL then you can try out the command line interactive example below.

>>> # Fetch the access token
>>> google.fetch_token(token_url, client_secret=client_secret,
... authorization_response=redirect_response)
... code=redirect_response)

>>> # Fetch a protected resource, i.e. user profile
>>> r = google.get('https://www.googleapis.com/oauth2/v1/userinfo')
Expand Down