OAuth2 Account

In this article

Overview

You can use this account type to connect the HTTP Client Snap with data sources that use the OAuth2 account.

Prerequisites

Valid Client ID, Client secret, OAuth2 Endpoint, and OAuth2 Token.

Limitations and Known Issues

None.

Account Settings

oauth2-account-overview.png
  • Asterisk ( * ): Indicates a mandatory field.

  • Suggestion icon ( ): Indicates a list that is dynamically populated based on the configuration.

  • Expression icon ( ): Indicates the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.

  • Add icon ( ): Indicates that you can add fields in the field set.

  • Remove icon ( ): Indicates that you can remove fields from the field set.

Field Name

Field Type

Description

Field Name

Field Type

Description

Label*

 

Default Value: None
ExampleHTTP Client OAuth2 Account

String

Specify a unique label for the account.

 

Client ID*

Default Value: N/A
Examplebcptk3dmg19btc1ahofqw5bhzrhg

String

Specify the OAuth Client ID associated with your account. You can create the client ID as advised by your application provider.

Client secret

Default Value: N/A
Examplejhktz@wld*(687 

String

Specify the OAuth Client secret associated with your account.

Send client data as Basic Auth header

Default ValueDeselected

Checkbox

Select this checkbox to pass the client data as part of the Basic Auth header when generating a token.

Access token

Default Value: N/A
Example<Encrypted>

String

Autogenerated on account authorization. The access token is used to make API requests on behalf of the user associated with the client ID.

Refresh token

 

Default Value: N/A
Example<Encrypted>

String

Autogenerated after authorization. Specify the refresh token associated with your account. If the refresh token is stored, then the access token can be refreshed automatically before it expires.

You should retrieve the Refresh token when setting up the account for the endpoint, where the OAuth2 flow is executed and the resulting refresh token is stored in this field. If the refresh token is stored, then the access token can be refreshed automatically before it expires. 

Access token expiration

Default ValueCurrent Time + 3600 seconds
Example1663659049

Integer

Autogenerated on account authorization. The number of seconds after which the access token expires.

Header authenticated

Default Value: Deselected

Checkbox

Select this checkbox if the endpoint uses bearer header authentication.

OAuth2 Endpoint*

Default Value: N/A
Examplehttps://www.box.com/api/oauth2/authorize

String

Specify the URL of the endpoint that authorizes the application. 

OAuth2 Token*

Default Value: N/A
Examplehttps://www.box.com/api/oauth2/token

String

Specify the URL of the endpoint that retrieves the token for an authenticated account.

If you are using a REST OAuth2 Account, access the account token through account.access_token explicitly. The property must be marked as an expression. An example URL for LinkedIn is: "https://api.linkedin.com/v1/people/~?oauth2_access_token=" + account.access_token.

Grant Type

Default Valueauthorization_code
Exampleauthorization_code

Dropdown

Select the method of authorization.

  • Authorization Code: The user account is authenticated using credentials (username and password), which return to the client through a redirect URL. The application then receives the authorization code from the URL and uses it to request an access token.

  • Client Credentials: Obtains an access token for the client ID and client secret through the token endpoint URL.

  • Password: Obtains an access token using your log-in credentials (username and password). When selected, it populates the following fields:

    • Username: Specify the username of the account type.

    • Password: Specify the password of the account type.

Token endpoint config

Use this field set to define custom properties for the OAuth2 token endpoint. This endpoint returns access tokens or refresh tokens depending on the request parameters.

Token endpoint parameter

 

Default Value: N/A
Examplescope

String

Specify the parameter for the token endpoint.

 

Token endpoint parameter value

 

Default Value: N/A
Exampleprofile, user

String

Specify the value for the token endpoint parameter.

Auth endpoint config

Use this fieldset to define custom properties for the OAuth2 authentication endpoint.

Authentication parameter

 

Default Value: N/A
Examplescope

String

Specify the parameter for the token endpoint.

 

Authentication parameter value

 

Default Value: N/A
Exampleprofile, user

String

Specify the value for the OAuth2 authentication parameter.

Snaplex

Default Value: N/A
Example: /snaplogic/shared/cloud

String

Specify the Snaplex path to be used for OAuth2 operations.

  • By default, SnapLogic automatically selects an available Snaplex. So, use this field only to handle specific scenarios, such as a network limitation.

  • If the specified Snaplex is not available or does not exist, the execution fails.

Auto-refresh token

Default ValueDeselected

Checkbox

Select this checkbox to enable autorefresh of the access token before it expires.

Snap Pack History


Related Links