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.

  2. Navigate to APIs & Services → Enabled APIs & services.

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

  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.

  5. Navigate to APIs & Services → OAuth consent screen.

  6. Choose External from User Type and select Create. Choose any App Name and select Save and Continue.

  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.

  8. Add an email address registered as a Google account after selecting Add Users. Confirm by selecting Save and Continue.

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

  10. Select iOS for Application type and enter any Name. Select Create to continue.

  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. Google Drive Custom OAuth Client ID.cyberduckprofile

  3. Google Storage Custom OAuth Client ID.cyberduckprofile
  4. Use the OAuth Client ID created to edit the OAuth Client ID and OAuth Redirect Url in the template connection profile, leaving other keys unchanged.

ConfigurationExample

```

… OAuth Redirect Url com.googleusercontent.apps.NUMBER-ID:oauth OAuth Client ID NUMBER-ID.apps.googleusercontent.com ```

  • 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.

Based on the credentials shown in step 11 the correct configuration would look like this:

```

Protocol googledrive Vendor googledrive_custom Description Google Drive Custom OAuth Client ID Default Hostname www.googleapis.com OAuth Authorization Url https://accounts.google.com/o/oauth2/auth OAuth Token Url https://accounts.google.com/o/oauth2/token Scopes https://www.googleapis.com/auth/drive OAuth Redirect Url com.googleusercontent.apps.293168482058-dvjk8lh6u6n43kio156uerkqcgjl2i5k:oauth OAuth Client ID 293168482058-dvjk8lh6u6n43kio156uerkqcgjl2i5k.apps.googleusercontent.com ``` 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.

Back to top