Spreadsheet OAuth2 Account

In this article

Overview

You can use this account type to connect Google Sheets Snaps with data sources that use Spreadsheet OAuth2 account.

Prerequisites

None.

Limitations and Known Issues

None.

Account Settings

Asterisk (*) - indicates a mandatory field.

Field Name

Field Type

Description

Field Name

Field Type

Description

Label*

String

Specify a unique label for the account.

Default Value: [None]
Example: Spreadsheet OAuth2 Account

Access token*



String

Auto-generated upon account authorization. The access token for the application. You can retrieve the access token when setting up the account for the endpoint. The access token is refreshable, in which case you can store an optional refresh token. You 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: GHWW45jOI87hkkll09=

Refresh token



String

Auto-generated upon account authorization. If you create a new OAuth2 Account and authorize it, you might see that you did not get a refresh token (or even a consent dialog, because Google knows your Google Account has already authorized our Snap's Google OAuth app and only provides refresh tokens by default on the first authorization per Google Account, not per SnapLogic OAuth2 Account).

To force-receive a new refresh token, change "Approval Prompt" to "force", click the Authorize button, give consent to offline access in the browser, and confirm that you now have a refresh token.

Default Value: N/A
Example: HWW45jOI87hkkll09

Access token expiration

String

Auto-generated upon account authorization. The unix time until which the access token is valid. Learn more about Unix time.

Default Value: N/A
Example: 12169

OAuth2 Endpoint

 

String

This is a read-only field. The authorization endpoint that authorizes the application.

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

OAuth2 Token



String

This is a read-only field. The token endpoint to get the access token.

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

Auth endpoint config

Custom properties for the OAuth2 endpoint.

Access type

String

Read-only field that indicates whether the Snap needs to access a Google API when the user is not available. The field value offline results in a refresh token being obtained the first time authorization has been received.

Default Value: offline

Approval Prompt

Dropdown list

Indicates whether the user should be re-prompted for offline consent to receive a new refresh token. Available options are:

  • auto: This value only displays the consent prompt on the first time through the OAuth 2.0 authorization sequence.

  • force: To manually acquire a new refresh token, select force and re-authorize.

Default Value: auto
Example: force

Application scope

String

The scope for the application's execution. For example, the Snap could define that only reading data by the application should be allowed. Learn more about OAuth2 Scopes for Google APIs.

Default Value: https://www.googleapis.com/auth/spreadsheets https://www.googleapis.com/auth/drive

Auto-refresh token

Checkbox

Select the checkbox to receive refresh tokens automatically.

Troubleshooting

Error

Reason

Resolution

Error

Reason

Resolution

Error instantiating Google Spreadsheet or docs service.

Invalid credentials.

Check if the credentials and the token are valid.

Snap Pack History


Related Links