Setup a Custom OAuth Client ID for Google Drive & Google Cloud Storage

This is a step-by-step tutorial to connect with a custom OAuth 2.0 Client ID for Google Cloud Storage and Google Drive.

Application blocked by Google

Workaround to register your own Custom OAuth 2.0 Client ID for Google Cloud Storage and Google Drive and use it with a custom connection profile instead when encountering This app is blocked error when accessing Google Drive or Google Cloud Storage.

Register Client ID

  1. Log in to Google Cloud Resource Manager and create a new project. You will be prompted to select a name of the project.

    Create new Project
  2. Navigate to APIs & ServicesEnabled APIs & services.

    APIs and Services
  3. Select Enable APIs & Services and search for “Google Drive API” in the search box of the API library.

    Enable APIs
  4. Select Google Drive API from the search results and choose Enable. Repeat the same for Google Cloud Storage JSON API when you want to access Google Cloud Storage.

    API Library Google Drive
  5. Navigate to APIs & Services → OAuth consent screen.

    Consent Screen OAuth Client ID
  6. Choose External from User Type and select Create. Choose any App Name and select Save and Continue.

    App Information OAuth Client ID
  7. Select Add or Remove Scopes in the next step. Search for “Google Drive API” and enable the scope .../auth/drive. Repeat the same for .../auth/devstorage.full_control when you want to access Google Cloud Storage. Select Update to confirm and Save and Continue to move to the next step.

    List of Scopes OAuth Client ID
  8. Add an email address registered as a Google account after selecting Add Users. Confirm by selecting Save and Continue.

    Test Users OAuth Client ID
  9. Navigate to APIs & Services → Credentials and select OAuth client ID from Create Credentials.

    OAuth Client ID Credentials
  10. Select Desktop app for Application type and enter any Name. Select Create to continue.

    Application Type for Credentials
  11. Copy the Client ID displayed. You will need it to set up the custom connection profile in the next step.

    OAuth Client ID Credentials

Add Custom Connection Profile

  1. Download the template for Google Drive or Google Cloud Storage:

  2. Use the OAuth Client ID created to edit the OAuth Client ID, OAuth Redirect Url, and optionally the OAuth Client Secret in the template connection profile, leaving other keys unchanged.

    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
        <dict>
                    <key>OAuth Redirect Url</key>
            <string>com.googleusercontent.apps.NUMBER-ID:oauth</string>
            <key>OAuth Client ID</key>
            <string>NUMBER-ID.apps.googleusercontent.com</string>
           <key>OAuth Client Secret</key>
           <string>Client secret</string>
        </dict>
    </plist>
    
    • OAuth Redirect Url. Use the reverse notation of the OAuth Client ID and append :oauth to it.

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

  3. Double-click the connection profile to open and register or copy to the Profiles folder in the application support folder.

Update Protocol Selection in Bookmark

The saved profile will be available in the Protocol section of the bookmark configuration.