REST OAuth2 Account

The REST OAuth2 Account holds the client credentials and endpoints that an Outbound OAuth2 rule uses to get an access token from the OAuth2 provider. To create the account in the Policy builder, refer to Create an account in the Policy builder.

To use the authorization_code grant type, add a redirect URI to your application's settings at the OAuth2 provider before you click Authorize. This form has no field for it. After you sign in, the provider returns you to this URI: https://<control-plane-name>.snaplogic.com/api/1/rest/admin/oauth2callback/rest, where <control-plane-name> is the first part of your SnapLogic URL, such as elastic or emea. For example, https://elastic.snaplogic.com/api/1/rest/admin/oauth2callback/rest.

Field/Field set Description
Label Required. Specify a unique label for the account.
Client ID Required. Specify the client ID that the OAuth2 provider issued for your application.
Client secret Specify the client secret that the OAuth2 provider issued for your application.
Access token This field is read-only and fills in when you click Authorize. It holds the token that the rule sends to the upstream service.
Refresh token This field is read-only and fills in when you click Authorize. The account uses this token to get a new access token before the current one expires.

Some providers, such as Google, return a refresh token only when the authorization request asks for one. For Google, add access_type with the value offline and prompt with the value consent under Authorization endpoint config.

Access token expiration This field is read-only and fills in when you click Authorize. It holds the time when the access token expires, as a Unix timestamp in seconds.
Header authenticated This setting has no effect on an Outbound OAuth2 rule. The rule's Token Location setting decides where the rule sends the token.

Default status: Deselected

OAuth2 authorization endpoint Required. Specify the URL of the OAuth2 provider's endpoint that authorizes the application.

Example: https://login.microsoftonline.com/common/oauth2/v2.0/authorize

OAuth2 token endpoint Required. Specify the URL of the OAuth2 provider's endpoint that issues tokens.

Example: https://login.microsoftonline.com/common/oauth2/v2.0/token

Grant type Select how the account gets an access token:
  • authorization_code: A user signs in to the OAuth2 provider, and the account exchanges the resulting authorization code for an access token.
  • client_credentials: The account gets an access token with the client ID and client secret alone.
  • password: The account gets an access token with a username and password.

Default value: authorization_code

Username

Appears when Grant type is password.

Specify the username for the OAuth2 provider.
Password

Appears when Grant type is password.

Specify the password for the OAuth2 provider.
Token endpoint config Optional parameters to send to the token endpoint. Click the plus sign to add a Token endpoint parameter and its Token endpoint parameter value. Click the minus sign to remove a row.
Authorization endpoint config Optional parameters to send to the authorization endpoint. Click the plus sign to add an Authentication parameter and its Authentication parameter value. Click the minus sign to remove a row.
Snaplex Specify the Snaplex that performs the OAuth2 operations. Leave it blank to let SnapLogic select an available Snaplex. If the Snaplex you specify isn't available, the operation fails.

Example: /snaplogic/shared/cloud

Auto-refresh token Select to refresh the access token automatically before it expires. The account needs a refresh token to do this.

Default status: Deselected

Send Client Data as Basic Auth header Select to send the client ID and client secret in a Basic Auth header when requesting a token.

Default status: Deselected

Description Optionally, describe the account.