Skip to Content
Authentication

Get a token

POST
/v1/get-token

Exchange your client credentials for a bearer token (OAuth 2.0 client credentials).

Request Body

  1. body
grant_type*"client_credentials"
Value in"client_credentials"
client_id?string

Omit when sent via HTTP Basic.

client_secret?string

Omit when sent via HTTP Basic.

client_assertion_type?string
client_assertion?string

private_key_jwt assertion.

Response Body

Bearer token; Cache-Control: no-store.

application/json
  1. response
access_token*string

The token. Send it as Authorization: Bearer <access_token>.

token_type?string

Always Bearer.

Default"Bearer"
expires_in*integer

Seconds until the token expires.

Example Request
curl -X POST 'https://api.wapiu.ai/v1/get-token' \  -H 'Content-Type: application/json' \  -d '{  "grant_type": "client_credentials"}'
Example Response
{  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",  "token_type": "Bearer",  "expires_in": 3600}