A Client ID and Client Secret are needed to create a standard GOOGLE OAuth2 Credential.
- Create the service account:
- Navigate to Google Cloud Platform Console and select the project created above.
- Click on the menu button at the top left of the page, and select API Manager.
- In the sidebar on the left, select Credentials.
- Select Create Credentials tab.
- Click the Create credentials button and select Service account key.
- Configure the service account settings:
- In the Service Account drop-down, select New service account.
- Enter an appropriate Service account name.
- Select the Project -> Service Account Actor role.If actor role does not exist then 'owner' will work too.
- Leave the Service account ID default value.
- Make sure JSON is selected as the Key type.
- Click the Create button and then OK.
- Save and configure the service account:
- Save the downloaded JSON file containing the account information.Make sure it is stored somewhere secure.
- Press the close button.
- Click the Manage service accounts link.
- Click the More actions button in the row corresponding to your newly created service account and select Edit.If that button is not visible you may need to scroll to the right.
- Select the Enable G-Suite Domain-wide Delegation checkbox, and press Save.
- Save the downloaded JSON file containing the account information.
- Authorize the Service Account Key to access a Google domain:
- Login to Google Admin Console as a User with Super Admin role.
- Click on Security.
- Click on Show more.
- Click on Advanced settings.
- Click on Manage API client access.
- Open the JSON file that was downloaded when you created the Service Account Key.
- Copy the value of the client_id field (without the enclosing quotes) and paste into the Client Name field in the browser.
- Enter the scopes you want to grant access to, separated by commas, in the One or More API scopes field and press the Authorize button.A list of available scopes is available at: https://developers.google.com/identity/protocols/googlescopes
Additional scopes may be added later by repeating the scope configuration steps.