Skip to main content

Configure Bearer Token Credentials

Configure a Credential that sends a bearer token and can refresh token values through a generated Credential Payload.

Configure Bearer Token Credentials

Use a Bearer Token Credential when the external API expects an Authorization: Bearer ... header.

This type is normally used for OAuth-style APIs where an access token is issued by an authentication endpoint. Payloads stores the current token values on the Credential and links the Credential to a generated Credential Payload that can model the token request and response.

For more detail on the generated Payload, see Configure a Credential Payload.

For the full token-refresh pattern, see Refresh and use a Bearer Token Credential.

Before you start

Collect the values required by the authentication API.

You will usually need a client id, client secret, access token, refresh token, token duration, and token endpoint. The exact set depends on the external API.

Check the API documentation for the token request body and response body. Payloads needs those details on the generated Credential Payload so it can read the response and update the Credential.

Configure the Credential

Create a Credential from the relevant Integration.

Set Type to Bearer Token.

Enter the Client Id and Client Secret if the token refresh request needs them.

Enter the current Access Token and Refresh Token if you already have them.

Set Access Token Duration in Minutes so Payloads can calculate when the token expires.

Save the Credential.

After save, the Credential shows Access Token Last Updated, Access Token Expires At, and Access Token Is Expired. Use those fields to confirm whether the stored token is still current.

Payloads creates a related Credential Payload for the token refresh flow. Open that Payload from the Token Payload field and finish the request, response, and target mappings.

A Bearer Token Credential record showing token fields, expiry fields, and the related generated Credential Payload.

The Bearer Token Credential stores the current token state and links to the generated Credential Payload used for refresh configuration.

Configure the generated Payload

Open the generated Credential Payload from the Credential.

Select HTTP Request, edit Request Settings and set the token Endpoint, Method and Content Type. Configure the Body, Headers and Parameters required by the authentication API.

Select HTTP Response and model the returned token fields. Open the following Target Action and check the mappings that update the Credential, including the access token and any refresh token or duration values returned by the API.

Keep the HTTP Request and HTTP Response Actions consecutive. The Target that stores the token must follow the response. See Configure a Credential Payload.

Attach it to a Payload

  1. Open the Outbound Payload and select HTTP Request in Actions.

  2. Edit Request Settings.

  3. Choose the Credential and save the settings section.

Use the HTTP Request Body, Headers and Parameters sections for request-specific values. Avoid adding a second authentication header or parameter that duplicates the Credential.

Run a controlled request and open the Job’s HTTP Request and HTTP Response Actions to inspect the outcome.

What to check

Before testing, check that:

  • the Credential has the expected access token and refresh token values

  • Access Token Duration in Minutes matches the token lifetime

  • Access Token Expires At and Access Token Is Expired reflect the current token state

  • the generated Credential Payload has the correct endpoint, method, request body, response body, and Data Targets

  • the business Payload has this Credential selected

After testing, open the Job records for both the token flow and the business Payload. Confirm the token response was read correctly and the business API call used the current bearer token.

Did this answer your question?