Google: OAuth2 generic
This document contains instructions for creating a generic OAuth2 Google credential for use with custom operations.
Prerequisites
- Create a Google Cloud account.
Set up OAuth
There are five steps to connecting your Otera credential to Google services:
- Create a Google Cloud Console project.
- Enable APIs.
- Configure your OAuth consent screen.
- Create your Google OAuth client credentials.
- Finish your Otera credential.
Create a Google Cloud Console project
First, create a Google Cloud Console project. If you already have a project, jump to the next section:
Enable APIs
With your project created, enable the APIs you'll need access to:
Configure your OAuth consent screen
If you haven't used OAuth in your Google Cloud project before, you'll need to configure the OAuth consent screen:
- Access your Google Cloud Console - Library. Make sure you're in the correct project.
Check the project dropdown in the Google Cloud top navigation - Open the left navigation menu and go to APIs & Services > OAuth consent screen.
- Select Get started to begin configuring OAuth consent.
- Enter an App name and User support email to include on the Oauth screen.
- For the Audience, select Internal for user access within your organization's Google workspace or External for any user with a Google account. Refer to Google's User type documentation for more information on user types.
- Select the Email addresses Google should use to contact you about changes to your project.
- Read and accept the Google's User Data Policy and select Create.
- In the left-hand menu, select Branding.
- In the Authorized domains section, select Add domain:
- When using Otera's Cloud service, add
Otera.cloud
- When using Otera's Cloud service, add
- Select Save at the bottom of the page.
Create your Google OAuth client credentials
Next, create the OAuth client credentials in Google:
- In the APIs & Services section, select Credentials.
- Select + Create credentials > OAuth client ID.
- In the Application type dropdown, select Web application.
- Google automatically generates a Name. Update the Name to something you'll recognize in your console.
- From your Otera credential, copy the OAuth Redirect URL. Paste it into the Authorized redirect URIs in Google Console.
- Select Create.
Finish your Otera credential
With the Google project and credentials fully configured, finish the Otera credential:
- From Google's OAuth client created modal, copy the Client ID. Enter this in your Otera credential.
- From the same Google modal, copy the Client Secret. Enter this in your Otera credential.
- You must provide the scopes for this credential. Refer to Scopes for more information. Enter multiple scopes in a space-separated list, for example:
https://www.googleapis.com/auth/gmail.labels https://www.googleapis.com/auth/gmail.addons.current.action.compose - In Otera, select Sign in with Google to complete your Google authentication.
- Save your new credentials.
Video
The following video demonstrates the steps described above:
Scopes
Google services have one or more possible access scopes. A scope limits what a user can do. Refer to OAuth 2.0 Scopes for Google APIs for a list of scopes for all services.
Otera doesn't support all scopes. When creating a generic Google OAuth2 API credential, you can enter scopes from the Supported scopes list below. If you enter a scope that Otera doesn't already support, it won't work.