2BrightSparks

Google Drive Client ID and Secret Key

Author: Swapna Naraharisetty, 2BrightSparks Pte. Ltd.

When an application is registered with Google Drive, a unique Client ID and Secret Key are generated for the app. These credentials are used in the app’s code to authenticate directly to Google services and send requests to Google Drive’s API.

When you use SyncBackPro to backup files to Google Drive, SyncBackPro’s registered client ID is used for authentication and to request access to data using Google Drive’s API. All SyncBackPro customers backing up files to Google Drive will share the same client ID. To ensure that Google Drive’s API is fairly used by all users and to prevent excessive usage of the service, Google sets quotas and limits on API requests. The quotas apply to the number of requests sent to the service from the application and individual users. Basically, this means there is a limit to how much SyncBackPro can communicate with Google Drive and that limit is shared by all users.

If the application exceeds the overall quota that Google has set for SyncBackPro when performing file backups to Google Drive, then you may receive a "403: User rate limit exceeded" error containing the project number 1092308504260. If you receive this error, we suggest creating your own client ID and secret key for SyncBackPro through the Google Cloud Console.

In this article, we will go through the steps for creating a Google Drive client ID and Secret Key for SyncBackPro (minimum V10, it is not supported in V9 and older versions).

Creating a custom Google Drive Client ID and Secret Key

  1. Login to the Google API Console
  2. Click “Select a Project” dropdown (on the top left) > select a project or create a “New Project”.
  3. Enable Google Drive API in the Google Cloud Project. Click on “Enabled APIs and Services”, search for “Drive” and enable the “Google Drive API”.
  4. All apps using OAuth 2.0 require a consent screen configuration. To configure the consent screen, click “Credentials” (on the left panel) and click on the “CONFIGURE CONSENT SCREEN” button (near the top right corner of the right panel).
  5. Then select “External” and click on the “CREATE” button.
  6. Enter an “Application name”, “User Support Email” and “Developer Contact Email” and click on the “Save” button (all other fields are optional).
  7. On the next screen, you need to define scopes (level of access) for your app. The scopes needed by SyncBackPro are:

  8. …/auth/drive (See, edit, create, and delete all of your Google Drive files)

    …/auth/userinfo.email (See primary Google Account email address)

    …/auth/userinfo.profile (See your personal info you have made publicly available)

  9. After adding scopes, click “Save and continue” to add test users. You should add your own Google account to the list of test users and save the changes.
  10. Next, you need to create credentials. Credentials are used to obtain an access token from Google's authorization servers so that the app can call Google APIs.

    Click again on “Credentials” on the left panel to go back to the “Credentials” screen. Click on the “+CREATE CREDENTIALS” button at the top of the window, and then select “OAuth client ID”.
  11. Change the Application type to “Desktop app” and give it a name. Then click on the “Create” button.
  12. On the next screen, you will be presented with your client ID and client secret. Keep a copy of these credentials.
  13. Once you have created your credentials, go back to the “OAuth consent screen”, click “PUBLISH APP” button, and confirm. Then add your Google account as a test user. Note: you do not need verification. Do not click the "Prepare for Verification" button.
  14. Enter the Client ID and Client Secret provided in step 11 in SyncBackPro.
  15. IMPORTANT: You must now re-authorize with the Google Drive server:
    • SyncBackPro V11: Click Preferences -> "Output debug information" from the main menu (the menu item should now be ticked).
    • SyncBackPro V10: Click on the burger menu Burger Menu > Preferences page, and tick on the “Output debug information” checkbox.
    • Go to burger menu Burger Menu > Global Settings > Patches settings page. Enter the client ID and secret key and click on the OK button.
    • Untick “Output debug information” from the Preferences menu/page.
    • Re-authorize with Google Drive from Linked Cloud account page, Cloud page or Shared settings.
    • Run the Google Drive profile.

Conclusion

In this article, you've learned how to create your own Google Drive API Client ID and Secret Key from the Google API console. The details that appear on your OAuth consent screen must be verified and approved by Google. However, you can use your Client ID and Secret Key in SyncBackPro while your project's OAuth consent screen configuration is under verification review.

Noted Customers

© 2003-2023 2BrightSparks Pte. Ltd.  | Home | Support | Privacy | Terms | Affiliate Program

Home | Support | Privacy | Terms
© 2003-2023 2BrightSparks Pte. Ltd.

Back to top