Skip to content

Create an access token

Request

Exchanges client credentials for an access token using the OAuth 2.0 client credentials grant.

Authenticate with HTTP Basic using client_id as the username and client_secret as the password, and send grant_type=client_credentials as a form-encoded body.

Tokens cannot be refreshed; request a new one when expires_in elapses.

Security
clientSecretBasic
Bodyapplication/x-www-form-urlencodedrequired
grant_typestringrequired
Value:"client_credentials"
Example:"client_credentials"
curl -i -X POST https://dev-api.wisedocs.ai/oauth/token \
  -u '<client_id>:<client_secret>' \
  -d grant_type=client_credentials

Responses

Access token issued.

Headers
Cache-Controlstring
Example:"no-store"
Pragmastring
Example:"no-cache"
Bodyapplication/json
access_tokenstringrequired

Raw JWT to send as Authorization: Bearer <access_token>.

Example:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.example.signature"
token_typestringrequired
Value:"Bearer"
Example:"Bearer"
expires_ininteger, >= 0

Seconds until the token expires.

Example:300
scopestring

Space-delimited scopes granted to this API client. Supported scopes are cases:read, cases:write, files:read, files:write, and teams:read.

Example:"cases:read files:read"
Response
{ "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.example.signature", "token_type": "Bearer", "expires_in": 300, "scope": "cases:read files:read" }