Set up OAuth2 in the Google Cloud Platform

Create an application in the Google Cloud Platform Console and retrieve the OAuth2 parameters to configure them in the Control Room.

Procedure

  1. Log in to the Google Cloud console.
  2. From the projects list, select a project or create a new one.
  3. Enable the APIs for the Google G Suite applications you want to automate, such as (Google Drive API, Google Calendar API, and Google Sheets API).
  4. At the top-left, click Menu > APIs & Services > Credentials.
    Navigating to the Credentials page
    If you are creating credentials for the OAuth client ID for the first time in Google Cloud Console, then you must perform the following steps to configure the OAuth consent screen and choose scopes:
    1. In the Google Cloud console, navigate to Menu > APIs & Services > OAuth consent screen.
    2. Select the user type for your app, then click Create.
    3. Complete the app registration form, then click Save and Continue.
    4. Click Add or Remove Scopes. After selecting the scopes required by your app, click Save and Continue.
    5. On Test users screen, enter your email address, then click Save and Continue.
    6. Review your app registration summary and click Back to Dashboard. However, you can click Editbutton if you want to make any changes to OAuth consent screen.
  5. Click +CREATE CREDENTIALS and select OAuth client ID.
    Selecting OAuth client ID option
  6. In the Application type field, choose Web application from the drop-down.
  7. Enter the application name.
  8. Log in to the Control room as an administrator and navigate to Manage > OAuth connections.
  9. Click Create connectiontab and select Custom option from the Provider type field.
  10. Copy the Callback URL and navigate back to the Create OAuth client ID page in Google Cloud Console.
  11. Click + ADD URI button under Authorized Redirect URIs and paste the URI in the URIs field.
  12. Click Create.
    Entering the OAuth Client ID details
  13. On the Credentials page, select Download OAuth client from Actions menu to download and save the Json file.
    Download the Oath client ID credential details
    From the downloaded Json file, make a note of the authentication details (such as client ID, client secret, authorization URI, token URI, redirect URI and so on) to integrate the OAuth connection in the Control Room.