Skip to content

GET Cabinet API Tokens

Endpoint

GET /api/affiliate/api-tokens

This endpoint uses the authenticated affiliate cabinet session. It does not accept an Affiliate API integration token as a replacement for that session.

The server derives affiliate_id and brand from the cabinet session. They cannot be selected through request parameters.

Response

{
  "rows": [
    {
      "id": 17,
      "name": "Reporting integration",
      "scopes": ["customers:read", "transactions:read"],
      "enabled": true,
      "expires_time": 1798761600,
      "last_used_time": 0,
      "created_time": 1789344000,
      "revoked_time": 0,
      "token": "eyJ..."
    }
  ],
  "count": 1,
  "authorization_format": "Authorization: {JWT_TOKEN}",
  "customers_endpoint": "/api/affiliate/v1/customers",
  "transactions_endpoint": "/api/affiliate/v1/transactions"
}

The token field is included only when the token record is enabled, has not been revoked, and has not expired. Revoked and expired records remain visible as metadata without their token value.

Tokens are created and revoked only through the manager CRM commands. The cabinet provides read and copy access only.

Errors

HTTP Error Description
401 INVALID_AFFILIATE_SESSION The cabinet session, affiliate, brand, or affiliate brand access is invalid