REST In-memory OAuth2 Account
Overview
You can use this account type to connect REST Snaps with data sources that support Client Credentials OAuth2 Authentication. This account should be used when the access_tokens provided by the Client Credentials grant type OAuth2 Authentication are short-lived (less than 30 minutes in time) as the account stores them in memory for reuse.
Prerequisites
- Client ID.
- Client Secret.
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: None Example: REST In-memory OAuth2 Account |
| Client ID | String |
Required. Specify the client ID associated
with the account. You can create the Client ID as advised by your
application provider. Default value: N/A Example: p364e45x-953x-460p-9pb0-934xep16p693 |
| Client secret | String |
Required. The client secret associated with
the account. You can create the client secret as advised by your
application provider. Default value: N/A Example: N/A |
| Send Client Data as Basic Auth Header | Checkbox | Select this checkbox to send the client information as a header
to the OAuth endpoint. Default value: Deselected |
| OAuth2 Token | String |
Required. Specify the URL of the endpoint (in
the following format) that retrieves the token for an authenticated
account. https://<endpoint
name>.endpoint.com/oauth_token. Note: When the Snap encounters 401 or 403 errors, this account
generates a new token and updates cache.
Default value: N/A Example: https://snaplogic-coupa-demo.coupacloud.com/oauth2/token |
| Grant Type | By default, this account uses Client Credentials Grant Type to obtain an access token using the Client ID and Client secret through the token endpoint URL. | |
| Token endpoint config | Use this field set to provide custom properties for the OAuth2 token endpoint. | |
| Token endpoint parameter | String | Specify additional token endpoint parameters. Default value: N/A Example: Scope |
| Token endpoint parameter value | String |
Specify the value associated with the optional endpoint parameter defined above.
Default value: N/A Example: core.accounting.read core.approval.read |
| Auto-refresh token | Checkbox |
Select this checkbox to refresh the token automatically.
If you deselect this field, the token expires and is not refreshed automatically.
Default value: Deselected |
REST In-memory OAuth2 Account Vs. REST OAuth2 Account
| REST In-memory OAuth2 Account | REST OAuth2 Account |
|---|---|
| The REST In-memory OAuth2 Account supports only client_credentials Grant type. | The REST OAuth2 Account supports the following authorization
Grant types:
|
| The REST In-memory OAuth2 Account is suitable for scenarios where the access token expiration time is less than 30 minutes. This account type efficiently manages tokens within the pipeline and Snap, ensuring a more localized token handling approach. | The REST OAuth2 Account is ideal for situations where access token expirations are 1 hour or more. If the OAuth2 service supports refresh tokens, enabling the Auto Refresh token checkbox lets Snaplogic automatically refresh tokens before they officially expire. |