Skip to Content
Docs

Client Grant

Description

The Client Grant connection type (client-grant) uses the OAuth 2.0 client credentials grant. Contextual exchanges a client ID and client secret for an access token and sends it as a bearer token. Tokens can expire as often as every hour, and Contextual renews them automatically.

Required Information

After you select this type in Connection Type, the console asks for the following fields. Every connection also has a Connection ID, Connection Name, and Connection Type.

Field Required Description
Endpoint Yes The base URL of the API.
Auth Endpoint Yes The token URL used to obtain an access token.
Client ID Yes The ID of the client application.
Client Secret Yes The secret for the client application. Stored as a secret.
Audience No The identifier of the API that the token is for. Set it when the provider requires one. If the Client ID and Client Secret come from a Contextual API Key, use the API Identifier shown on the key's Permissions tab.
Scope No The access scopes to request.
Content Type No The format of the token request: application/json or x-www-form-urlencoded.
Headers No Optional HTTP headers sent with each request. Under Headers, select Add, then enter a Key and Value. Values are masked like other secrets. Select Remove entry to delete a header.

Usage

Use this type for server-to-server API access where the provider issues short-lived tokens from a client ID and secret.