OpenAPI OAuth2 Account

In this article

Overview

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

ParameterData TypeDescriptionDefault ValueExample 
LabelString

Required. Provide a name for the account. We recommend that you update the account name if there is more than one account of the same account type in your project.

N/AOpenAPI OAuth2 Account
Client IDString

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

N/A3swddd3-4344-894b-90c201c91de
Client secretStringRequired. Enter the client secret associated with your account. You can create the client secret as advised by your application provider.N/A678753456
Access tokenStringAuto-generated after authorization. The token that SnapLogic uses to make API requests on behalf of the user associated with the client ID.N/A767886779
Refresh tokenStringAuto-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.N/A43923756
Access token expirationIntegerAuto-generated after authorization. The access token expiration value, in seconds.N/A 12345
Header authenticatedCheckboxSelect this check box to indicate that the endpoint uses bearer header authentication.Not selectedSelected
OAuth2 EndpointURLRequired. Enter the URL of the endpoint that authorizes the application. N/Ahttps://123-ABC-456.mktorest.com/rest/
OAuth2 TokenStringRequired. Enter the URL of the endpoint that retrieves the token for an authenticated account.N/Ahttps://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.
authorization_codeclient_credentials
Token endpoint config

Use this fieldset to provide custom properties for the OAuth2 token endpoint. Click the + or - icons to respectively add or remove configuration rows.

This fieldset comprises the following fields:

  • Token endpoint parameter
  • Token endpoint parameter value
Token endpoint parameterStringEnter the token endpoint parameter.N/Ascope
Token endpoint valueStringEnter the value associated with the endpoint parameter defined above.N/Aoffline_access User.Read.All  Mail.ReadWrite    MailboxSettings.ReadWrite  Calendars.ReadWrite   Contacts.ReadWrite
Auth endpoint config

Use this fieldset to provide custom properties for the OAuth2 auth endpoint. Click the + or - icons to respectively add or remove configuration rows.

This fieldset comprises the following fields:

  • Auth endpoint parameter
  • Auth endpoint value
Auth endpoint parameterStringEnter the authorization endpoint parameter.N/Ascope
Auth endpoint valueStringEnter the value associated with the authorization endpoint parameter defined above.N/Aoffline_access User.Read.All  Mail.ReadWrite    MailboxSettings.ReadWrite  Calendars.ReadWrite   Contacts.ReadWrite
Auto-refresh tokenCheckboxSelect this check box to refresh the access token automatically using the refresh token. Otherwise, the access token expires and is not refreshed automatically.Not selectedSelected
AuthorizeButtonClick 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. NANA
Send Client Credentials as Basic Auth HeaderCheckboxSelect this checkbox when you want to send the client information as a header to the OAuth endpoint.DeselectedN/A

Troubleshooting

ErrorReasonResolution
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

Insert valid details into the following fields and click Authorize.

  • 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.


See Also