Skip to content

Authenticate client

Request

Authenticate a client and retrieve the JWT token

Headers
API-Versionstringrequired

API version — must be 1.0.0 or higher

Example:1.0.0
Bodyapplication/jsonrequired

The client credentials.

client_idstringrequired

The client ID to use for authentication

Example:"los-client"
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/b2b/auth/token \
  -H 'API-Version: 1.0.0' \
  -H 'Content-Type: application/json' \
  -d '{
    "client_id": "los-client",
    "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"
refresh_expires_ininteger, (int32)

The refresh 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
access_tokenstringrequired

The JWT token.

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

The token expiry in seconds.

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