OAuth 2.0 authentication (recommended)

ℹ️

Note

OAuth 2.0 is deactivated by default. To activate this feature, Orange Logic administrators can submit a support request. After the feature is activated, an Orange Logic administrator can allow bearer authentication on an account. After bearer authentication is permitted on your account, you can follow the procedure below.

To authenticate API calls with OAuth 2.0, you must:

  1. Retrieve the OAuth 2.0 Client Credentials for a user account.
  2. Use those credentials to generate an access token.

Retrieve OAuth 2.0 Client Credentials for a user account

You can retrieve OAuth 2.0 Client Credentials via API or in the Orange Logic interface.

To retrieve credentials via API, run the Get Client Credentials API.

To retrieve credentials in the Orange Logic interface:

  1. Log in to the Orange Logic interface.

  2. Go to Administration > Contacts > Accounts and select an account type.

    Administration Contacts Menu

    Administration Contacts Menu

  3. Search for the user account.

  4. Click View next to the user you want to authenticate. The user’s Account information opens.

    View a user account

    View a user account

  5. Click the OAuth 2.0 Client Credentials button to open the Client Credentials window.

    OAuth 2.0 Client Credentials

    OAuth 2.0 Client Credentials

  6. Copy the Client ID and Client secret to generate an access token.

💡

Tip

To see your own client credentials, go to User menu > My Account > OAuth 2.0 Client Credentials.

OAuth2.0 Credentials in My Account

OAuth2.0 Credentials in My Account

Generate an access token

ℹ️

Note

Use an API client, such as Postman, to complete the steps below.

Generate an access token that you can use for OAuth 2.0 authentication of API calls by running the Authentication API.

  1. Create a POST request.
  2. Specify OAuth 2.0 as the Auth type.
  3. Enter a token name.
  4. Specify Client Credentials as the Grant type.
  5. Enter the Authentication API below as the Access Token URL, inserting your Orange Logic site address: https://{OrangeLogicURL}/webapi/security/clientcredentialsauthentication/authenticate_46H_v1
  6. Enter the Client ID and Client Secret that you retrieved.
  7. Specify that client credentials will be sent in the API body as the client authentication method.
  8. Click Get New Access Token.
Authentication API call in Postman

Authentication API call in Postman

When you receive a successful response from your call, the user account is authenticated. You can save the token and use it to authenticate future API calls.