Skip to content

Instantly share code, notes, and snippets.

@hakonhagland
Last active April 24, 2017 19:42
Show Gist options
  • Save hakonhagland/6d4d2fcf15c3c54cccd0206c16b38c80 to your computer and use it in GitHub Desktop.
Save hakonhagland/6d4d2fcf15c3c54cccd0206c16b38c80 to your computer and use it in GitHub Desktop.
Generating and downloading client secrets for oauth2 for an installed application using Google API console

Setting up OAuth 2.0 (Installed Applications)

To use OAuth 2.0 in your installed application, you need an OAuth 2.0 client ID, which your application uses when requesting an OAuth 2.0 access token. See https://developers.google.com/api-client-library/python/auth/installed-app for more information.

To create an OAuth 2.0 client ID in the console, go to the API Console. https://console.developers.google.com

If the API Manager page isn't already open, open the console left side menu and select API Manager.

From the projects list menu in the top bar create a new project by clicking the pluss sign in the top right corner. Type a project name.

  • In the left sidebar menu, click Credentials.
  • Click "Create credentials", then select "OAuth client ID".
  • Click "Configure consent screen".
  • Enter email address and fill in "Product name shown to users".
  • Press the "save" button.
  • Select the Application type by clicking the "Other" radio button.
    Note: "Other" means here "installed apllication".
  • Enter name of client ID, and press the "Create" button.
  • Then press "Ok" on the summary screen.

Then click the button with a pencil "Edit OAuth client" to the right of the summary line of the newly created client in "Credentials" screen.

Click "DOWNLOAD JSON" in the top bar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment