The following provides steps for setting up API access using the Workflows API Connector card and OAuth to connect to the Resource Manager API in Google Cloud Platform.
This also includes information on how to set up the connection to obtain a Refresh Token when accessing the Google API, which is done by adding a query parameter to the Authorize Path when configuring the Custom API Connector.
NOTE: This process will likely work with other cloud.google.com API endpoints, assuming they are enabled and the proper scopes are utilized.
- Okta Workflows
- Google Cloud Platform APIs
- Log into the Google Cloud Platform console.
- Follow the instructions at Create a client ID and client secret to create a Webapp.
- For the Redirect URI, use the following Redirect URIs for Workflows Preview and Production orgs, respectively:
- Record the Client ID and Client Secret after completing the previous step.
- Navigate to Cloud Resource Manager API and enable it.
- Log into the Okta Workflows console
- Click Connections > New Connection > API Connector.
- Provide a name, and select Auth Type (Oauth).
- Provide the following:
- Authorize Path: https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force
- Access Token Path: https://www.googleapis.com/oauth2/v3/token
- Scope: https://www.googleapis.com/auth/cloud-platform
- Client ID: Recorded in step 3 above.
- Client Secret: Recorded in step 3 above.
- Click Create. There will be a prompt to log into Google and to grant access.
At this point, access should be successful. To confirm, the following method can be used: GET to the following API Endpoint to list all Google Cloud Projects attached to the account: API Endpoint.
