Google Drive OAuth2 User Account

connects Google Drive Snaps with data sources that use Google Drive OAuth2 User Account.

Overview

This account type connects Google Drive Snaps with data sources that use Google Drive OAuth2 User Account.

Prerequisites

None.

Prerequisites

Limitations and known issues

None.

Account settings


Create Google Drive oAuth2 Account dialog

Legend:
  • Expression icon (): JavaScript syntax to access SnapLogic Expressions to set field values dynamically (if enabled). If disabled, you can provide a static value. Learn more.
  • SnapGPT (): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
  • Suggestion icon (): Populates a list of values dynamically based on your Account configuration.
  • Upload : Uploads files. Learn more.
Learn more about the icons in the Snap settings dialog.
Field / field set Type Description
Label String Required. Specify a unique label for the account.
Client ID String Required. Specify the client identity that you obtain from the API Console.

Default value: N/A

Example: abcd12345xyz567

Client Secret String Required. Specify the client identity that you obtain from the API Console. Specify the client identity that you obtain from the API Console.

Default value: N/A

Example: xasfnhji1238

Access token String The access token for the application. The retrieval of the access token is done when setting up the account for the endpoint. There, the OAuth2 flow will be executed and the resulting access token will be stored in this property. The access token might be refreshable, in that case an optional refresh token can be stored. The user must get a new access token if the access token has expired and no refresh token was defined or both the access and the refresh token have expired.

Default value: N/A

Example: N/A

Refresh token String The refresh token for the application. The retrieval of the refresh token is done when setting up the account for the endpoint. The OAuth2 flow will be executed and the resulting refresh token can be stored in this property. If the refresh token is stored, then the access token can be refreshed automatically before it expires.

Default value: N/A

Example: N/A

Access Token Expiration String The access token expiration value.

Default value: N/A

Example: N/A

Header Authenticated Checkbox Select this checkbox if the endpoint uses the bearer header authentication.

Default status: Deselected

OAuth2 Endpoint String Specify the endpoint to authorize the application.

Default value: https://accounts.google.com/o/oauth2/auth

Example: N/A

OAuth2 Token String Specify the endpoint to get the access token.

Default value: https://oauth2.googleapis.com/token

Example: N/A

Token endpoint config Use this field set to define custom properties for the OAuth2 token endpoint.
Token endpoint parameter String Specify the parameter for the token endpoint.

Default value: N/A

Example: redirect_uri

Token endpoint parameter value String Specify the value for the token endpoint parameter.

Default value: N/A

Example: https://elastic.snaplogic.com/api/1/rest/admin/oauth2callback/googledrive

Auth endpoint config Use this fieldset to define custom properties for the OAuth2 authentication endpoint.
Authentication parameter String Specify the parameter for the token endpoint.

Default value: N/A

Example: redirect_uri

Authentication parameter value String Specify the value for the token endpoint parameter.

Default value: N/A

Example: https://elastic.snaplogic.com/api/1/rest/admin/oauth2callback/googledrive

Auto-Refresh token Checkbox Select this checkbox to enable auto-refresh of the access token before it expires.

Default status: Deselected

Note: Click Validate after entering the required details to ensure that all fields have been filled accurately. Click Apply to save the settings.

Authorization Endpoint Configuration Settings

To ensure proper OAuth2 authentication, use the following configuration settings:

Parameter Value
scope Required OAuth2 scopes. These must be defined in the OAuth2 Client in the Google Console (e.g., https://www.googleapis.com/auth/drive) Learn more. Refer to OAuth 2.0 Scopes for Google Drive API to find the necessary scope for each REST resource.
access_type offline (Ensures refresh tokens are issued for long-term access.)
redirect_uri https://elastic.snaplogic.com/api/1/rest/admin/oauth2callback/googledrive (Specifies the callback URL for authentication.)
prompt consent (Forces user consent during authentication, ensuring fresh permissions are granted.)