OAuth2 Account
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.
Account settings

- Expression icon (
): Allows using 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 Snap configuration. You can select only one attribute at a time using the icon. Type into the field if it supports a comma-separated list of values.
- Upload
: Uploads files. Learn more.
| Field / Field set | Type | Description |
|---|---|---|
| Label | String |
Required. Specify a unique label for the account. Default value: N/A Example: HTTP Client OAuth2 Account |
| Client ID | String | Required. Specify the OAuth Client ID associated with
your account. You can create the client ID as advised by your application
provider. Default value: N/A Example: bcptk3dmg19btc1ahofqw5bhzrhg |
| Client secret | String | Specify the OAuth Client secret associated with your account. Default value: N/A Example: jhktz@wld*(687 |
| Send client data as Basic Auth header | Checkbox | Select this checkbox to pass the client data as part of the Basic Auth header
when generating a token. Default status: Deselected |
| Access token | String | Autogenerated on account authorization. The access token is used to make
API requests on behalf of the user associated with the client ID. Default value: N/A Example: <Encrypted> |
| Refresh token | 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. Default value: N/A Example: <Encrypted> |
| Access token expiration | Integer | Autogenerated on account authorization. The number of seconds after
which the access token expires. Default value: Current Time + 3600 seconds Example: 1663659049 |
| Header authenticated | Checkbox | Select this checkbox if the endpoint uses bearer header authentication. Default status: Deselected |
| OAuth2 Endpoint | String | Specify the URL of the endpoint that authorizes the application. Default value: N/A Example: https://www.box.com/api/oauth2/token |
| OAuth2 Token | String | Specify the URL of the endpoint that retrieves the token for an authenticated
account. Warning: 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:
Default value: N/A Example: https://www.box.com/api/oauth2/token |
| Grant Type | Dropdown list | Select the method of authorization.
Default value: authorization_code Example: authorization_code |
| 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 | String | Specify the parameter for the token endpoint. Default value: N/A Example: scope |
| Token endpoint parameter value | String | Specify the value for the token endpoint parameter. Default value: N/A Example: profile, user |
| 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: scope |
| Authentication parameter value | String | Specify the value for the OAuth2 authentication parameter. Default value: N/A Example: profile, user |
| Snaplex | String | Specify the Snaplex path to be used for OAuth2 operations. Note:
Default value: N/A Example: /snaplogic/shared/cloud |
| Auto-refresh token | Checkbox | Select this checkbox to enable autorefresh of the access token before it
expires. Default status: Deselected |
The Redirect URL must be set in the following format in the app that is created in the endpoint:
https://<control-plane-name>.snaplogic.com/api/1/rest/admin/oauth2callback/<snap-pack-name>where
the <control-plane-name> corresponds to the domain part of your
SnapLogic URL—elastic (global control plane) or emea (EMEA control
plane). For example:
https://elastic.snaplogic.com/api/1/rest/admin/oauth2callback/apisuite
You must append the Snap Pack name at the end of the Redirect URI; otherwise, your account will be unauthorized.
