OpenAPI OAuth2 Account

Use this account type to connect OpenAPI Snaps with data sources that use OAuth2 accounts.

Prerequisites

To create an OpenAPI OAuth2 account, ensure that your endpoint's account has:

  • Valid scopes.
  • Valid credentials.
  • Valid permissions.

See OpenAPI OAuth2 for details.

Limitations and known issues

The configuration varies based on the OpenAPI version of your OpenAPI endpoint since the OpenAPI Snap supports both version 2 and 3.

Account settings

Legend:
  • 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.
Learn more about the icons in the Snap settings dialog.
Field / Field set Type Description
Label String

Required. Specify a unique label for the account.

Default value: N/A

Example: OpenAPI OAuth2 Account
Client ID String Required.

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

Default value: N/A

Example: 3swddd3-4344-894b-90c201c91de
Client secret String

Required. Enter the client secret associated with your account. You can create the client secret as advised by your application provider.

Default value: N/A

Example: 678753456

Access token String Required. Auto-generated after authorization. The token that SnapLogic uses to make API requests on behalf of the user associated with the client ID.

Default value: N/A

Example: 767886779

Refresh token String Auto-generated after authorization. The refresh token associated with your account. If the refresh token is stored, then the access token can be refreshed automatically before it expires.

Default value: N/A

Example: 43923756

Access token expiration Integer Auto-generated after authorization. The access token expiration value, in seconds.

Default value: N/A

Example: 12345

Header authenticated Checkbox Select this checkbox to indicate that the endpoint uses bearer header authentication.

Default status: Deselected

OAuth2 authorization endpoint URL Required. Enter the URL of the endpoint that authorizes the application.

Default value: N/A

Example: https://123-ABC-456.mktorest.com/rest/

OAuth2 token endpoint String Required. Enter the URL of the endpoint that retrieves the token for an authenticated account.

Default value: N/A

Example: https://123-ABC-456.mktorest.com/identity/oauth/token

Grant type String

Select the method of authorization.

  • authorization_code: The user 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 to the client ID and client secret through the token endpoint URL.
  • password: Obtains access token using your login credentials (username and password). When selected, it populates the following fields:
    • Username: Enter the username of the account type.
    • Password: Enter the username of the account type.

Default value: authorization_code

Example: client_credentials

Token endpoint config

Use this fieldset to provide custom properties for the OAuth2 token endpoint.

Token endpoint parameter String Enter the token endpoint parameter.

Default value: N/A

Example: scope

Token endpoint parameter value String Enter the value associated with the endpoint parameter defined above.

Default value: N/A

Example: offline_access User.Read.All Mail.ReadWrite MailboxSettings.ReadWrite Calendars.ReadWrite Contacts.ReadWrite

Authorization endpoint config

Use this fieldset to provide custom properties for the OAuth2 auth endpoint.

Authentication parameter String Enter the authorization endpoint parameter.

Default value: N/A

Example: offline_access User.Read.All Mail.ReadWrite MailboxSettings.ReadWrite Calendars.ReadWrite Contacts.ReadWrite

Auto-refresh token Checkbox Select this check box to refresh the access token automatically using the refresh token. Otherwise, the access token expires and is not refreshed automatically.

Default status: Deselected

Authorize Button Click this button to authorize the account using the credentials provided in the Client ID, Client Secret, OAuth2 Endpoint, and OAuth2 Token fields. We recommend that you click this button if this is the first time you are creating this account.

Default value: N/A

Example: N/A

Send Client Data as Basic Auth Header Checkbox Select this checkbox when you want to send the client information as a header to the OAuth endpoint.

Default status: Deselected

Troubleshooting

Error Reason Resolution
One or more required field is blank

You click Authorize in the account dialog window, but one or more of the following fields is blank:

  • Label
  • Client ID
  • Client Secret
  • OAuth2 Endpoint
  • OAuth2 Token

You attempted to authorize your account, but authorization failed. Thus, the following fields are empty:

  • Access token
  • Refresh token
  • Access expiration token

You still click Apply.

Insert valid details into the following fields and click Authorize.

  • Label
  • Client ID
  • Client Secret
  • OAuth2 Endpoint
  • OAuth2 Token