Custom OAuth 2.0 Client ID for Google Cloud Storage and Google Drive

Instructions to register a custom OAuth 2.0 Client ID in the Google Cloud Console. to connect to Google Drive. For Google Storage.

To use OAuth 2.0 in your application, you need an OAuth 2.0 client ID, which your application uses when requesting an OAuth 2.0 access token.

Register Client ID

Follow the steps in Setting up OAuth 2.0. From Credentials copy the client ID and client secret by choosing the action Edit OAuth client.

  • Choose Desktop app as the Application type which will result in a Client ID with a suffix like number-id.apps.googleusercontent.com.

Google Create OAuth Client ID Google Client ID and Client Secret
  • Edit the OAuth Consent Screen* to add the scopes Google Cloud Storage JSON API ../auth/devstorage.read_write and/or Google Drive API ../auth/drive. You will first need to enable Google Drive in the Google API Library.

Edit Custom Connection Profile

Create a custom connection profile with the following properties.

  • OAuth Client ID. Override the registered application client id.

  • OAuth Client Secret. Optional. Override the registered application client secret.

  • OAuth Redirect Url. Use the reverse notation of the client id and set it like

<key>OAuth Redirect Url</key>
<string>com.googleusercontent.apps.number-id:oauth</string>

Sample Google Drive with Custom OAuth Client ID Connection Profile

Sample Google Cloud Storage with Custom OAuth Client ID Connection Profile