Skip to content

Create an access token

POST
/partner/authorization/token
curl --request POST \
--url https://client-api.abi.ai/partner/authorization/token \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{ "subPartnerName": "partner_test" }'

Exchange the partner API key for an access token. Include subPartnerName only when the token must be scoped to a configured sub-partner. The request body may be omitted entirely.

Media typeapplication/json

Optional body used to scope the issued token to a configured sub-partner. The API key is sent in the x-api-key header, not in this body.

object
subPartnerName

Exact registered sub-partner name to scope the token.

string
Example
partner_test

Access and refresh tokens created.

Media typeapplication/json
object
access_token

Bearer token for authenticated API requests.

string
token_type
string
Allowed values: Bearer
refresh_token

Token used to obtain a replacement access token.

string
Example
{
"access_token": "your_access_token",
"token_type": "Bearer",
"refresh_token": "your_refresh_token"
}

Request could not be completed.

Media typeapplication/json
object
code

Short machine-readable error code.

string
message

Human-readable explanation of the error.

string
Examplegenerated
{
"code": "example",
"message": "example"
}