Skip to main content

Token

Client Credentials Flow

Endpoint POST /api/v1/token

Request Body

Request Body is expected to be send as JSON-Body

ParameterTypeRequiredDescription
organization_idstringtruethe organization the operation should be performed on
grant_typestringtrueclient_credentials
redirect_uristringtruethe url to wich the service redirects after auth flow
client_idstringtrueclient id of the oauth client performing the request
client_secretstringtruerequired in client_credentials flow
scopestringtruescopes which the token needs to access
statestringfalsecan add additional security to the flow

Authorization Code Flow

Endpoint POST /api/v1/token

Request Body

Request Body is expected to be send as JSON-Body

ParameterTypeRequiredDescription
organization_idstringtruethe organization the operation should be performed on
grant_typestringtrueauthorization_code
codestringtruerequired in code flow
redirect_uristringtruethe url to wich the service redirects after auth flow
client_idstringtrueclient id of the oauth client performing the request
client_secretstringpossiblyrequired if PKCE is not used
code_verifierstringpossiblyrequired if client_secret is not used
scopestringtruescopes which the token needs to access
statestringfalsecan add additional security to the flow

Refresh-Token Flow

Endpoint POST /api/v1/token

Request Body

Request Body is expected to be send as JSON-Body

ParameterTypeRequiredDescription
organization_idstringtruethe organization the operation should be performed on
grant_typestringtrueauthorization_code
codestringtruerequired in code flow
redirect_uristringtruethe url to wich the service redirects after auth flow
client_idstringtrueclient id of the oauth client performing the request
client_secretstringpossiblyrequired if PKCE is not used
code_verifierstringpossiblyrequired if client_secret is not used
scopestringtruescopes which the token needs to access
statestringfalsecan add additional security to the flow

Responses

Success Response 200

{
"success": true,
"access_token": {
"token": "CvgEooWa7EbShMfEKJGKhzYcIkdrJMT0",
"expires": 3600
},
"refresh_token": {
"token": "fHmoWoi4cOXPfG6ZsB52WwANEUjMgy2C",
"expires": 2592000
},
"token_type": "bearer"
}

Error Response 400

{
"success": false,
"error_code": 400,
"error_msg": "Bad Request" // Detailed Error Message
}

Error Response 401

{
"success": false,
"error_code": 401,
"error_msg": "Unauthorized" // Detailed Error Message
}

Error Response 500

{
"success": false,
"error_code": 500,
"error_msg": "Internal Server Error" // Detailed Error Message
}