Skip to content

Authenticate client

Request

Authenticate a client and retrieve the JWT token

Headers
API-Versionstring
Value:"1.0.0"
Bodyapplication/jsonrequired

The client credentials.

client_idstringrequired

The client ID to use for authentication

Example:"my-client-id"
client_secretstringrequired

The client secret to use for authentication

Example:"my-super-auth-secret"
curl -i -X POST \
  https://api-docs.raipartners.com/_mock/apis/client-management-api-v1/auth/token \
  -H 'API-Version: 1.0.0' \
  -H 'Content-Type: application/json' \
  -d '{
    "client_id": "my-client-id",
    "client_secret": "my-super-auth-secret"
  }'

Responses

The JWT token.

Bodyapplication/json
scopestringrequired

The token scope as a space delimited set of values.

Example:"read:user write:user"
access_tokenstringrequired

The JWT token.

Example:"eyo....."
expires_ininteger, (int32)required

The token expiry in seconds.

Example:300
token_typestringrequired

The token type.

Example:"Bearer"
not-before-policyinteger, (int32)

The not before policy in seconds.

Example:0
refresh_expires_ininteger, (int32)

The refresh token expiry in seconds.

Example:300
Response
{ "scope": "read:user write:user", "access_token": "eyo.....", "expires_in": 300, "token_type": "Bearer", "not-before-policy": 0, "refresh_expires_in": 300 }