Get API token

POST
/api/v1/get-token

Exchange your API key and API secret for an access token.

Include the returned access_token as a bearer token on every subsequent request:

Authorization: Bearer <access_token>

The access token expires after expires_in seconds (5 minutes by default). The refresh_token is valid for refresh_expires_in seconds (30 minutes by default).

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/get-token" \  -H "Content-Type: application/json" \  -d '{    "apiKey": "apikey",    "apiSecret": "apisecret"  }'
{  "status": "200 OK",  "data": {    "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJMY3BXbEt5QmMwRn...",    "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICIxMzU5NjllZS1hYWM...",    "expires_in": 300,    "refresh_expires_in": 1800  }}