Token Exchange

Obtain an access token using client_credentials for a service account, or exchange
an authorization_code or refresh_token for an entity or organization app.
App grants return a refresh token; client_credentials does not. Organization-level
tokens require an entity selector on entity-specific requests, including source writes.

The Digits API supports two authentication modes:

authorization_codeand refresh_token- standard OAuth flow, for granting access to a single connection. Most integrations will use this authentication mode, as it allows for writing data.

client_credentials- Directly pull an Access Token for client credentials. The resulting access token may only be used against non-source endpoints. An OAuth authorization flow is required for writing data via the source APIs.

Body Params
string
enum
required

The grant type: client_credentials for service accounts; authorization_code or
refresh_token for entity and organization apps. Organization apps require user consent.

Allowed:
string
required

The app or service account client ID. Use credentials from the same environment.

string
required

The app or service account client secret.

string

Single-use authorization code. Required for authorization_code grants.

string

Required for authorization_code grants.

string

grant_type: refresh_token
The refresh token issued to the client.
Required when the grant_type is "refresh_token".

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json