Skip to content

Get access token

POST
/v1/auth/login
curl --request POST \
--url https://api-admin.billz.ai/v1/auth/login \
--header 'Content-Type: application/json' \
--header 'platform-id: 7d4a4c38-dd84-4902-b744-0488b80a4c01' \
--data '{ "secret_token": "YOUR_SECRET_KEY" }'

Error codes: 400 — input validation error; 401, 403, 429, 500 — shared by all methods. Body formats and semantics: Response codes and errors.

platform-id
string
default: 7d4a4c38-dd84-4902-b744-0488b80a4c01

Platform identifier. A static value is used for integrations.

Media typeapplication/json
object
secret_token
required

Integration secret key. Empty string — 403

string
Example
{
"secret_token": "YOUR_SECRET_KEY"
}

Successful response

Media typeapplication/json
object
code

Duplicates the HTTP status (200)

integer format: int32
message

‘ok’ on success

string
error

Null on success

integer format: int32
nullable
data

Access tokens

object
access_token

JWT access token for the Authorization: Bearer header

string
refresh_token

One-time refresh token for POST /v2/auth/refresh

string
token_type

Always Bearer

string
expires_in

Lifetime of access_token in seconds

integer format: int32
key
additional properties
any
Examplegenerated
{
"code": 1,
"message": "example",
"error": 1,
"data": {
"access_token": "example",
"refresh_token": "example",
"token_type": "example",
"expires_in": 1
}
}