Skip to main content

Get Google access token

Sophie avatar
Written by Sophie
Updated over a week ago

Definition and Usage

Retrieves the Google OAuth access token by using the provided client ID and client secret. This command allows automation workflows to authenticate with Google services by obtaining the necessary access token for API calls.

πŸ’‘ Tip

Not sure how to get your Google OAuth Client ID and Secret?

You can refer to this step-by-step tutorial: How to Connect Octoparse AI to Google Sheets


Parameter Values

Input parameters

Parameter

Description

Required

Options / Notes

OAuth client ID

Enter the unique client ID assigned for Google OAuth authentication

Yes

This value is provided in your Google Cloud Console

OAuth client secret

Enter the unique client secret assigned for Google OAuth authentication

Yes

Keep this value secure and do not expose it

Error handling

Parameter Name

Description

Throw error & stop

When an error occurs, the action will trigger an error and stop the execution of the entire app.

Retry command

If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process.

Ignore error & continue

When an error occurs, the action will be ignored, and the workflow will continue without interruption.

Variables produced

This action produces a variable containing the Google access token that can be used for authenticating API requests to Google services.


Using Variables in Conditions

You can use the {x} syntax to insert previously created variables into parameter fields. For example, you might use a variable to store and reuse client ID or secret values across multiple actions in your workflow.


Notes

  • Before using this command, ensure you have created a project in Google Cloud Console and obtained the necessary OAuth credentials.

  • The client ID and client secret must be valid for the specific Google API services you intend to access.

  • The retrieved access token has a limited lifespan (typically 1 hour) and will need to be refreshed for extended operations.

  • For security reasons, it's recommended to handle client secrets securely and not expose them in shared workflows.

Did this answer your question?