REST API: access tokens

List permanent API tokens

Read the permanent API tokens of the account.

Purpose

Use this call to see which permanent API tokens exist and when each one stops working. Tokens are created in the dashboard or with create token.

Request

POST <API_BASE_URL>/tokens. All calls are POST under your API address. Replace <API_BASE_URL> with the API address provided with your access.

This operation takes no permanent API token. Send a user token in the token header. See authentication and user authorization.

The body has no fields.

Response

HTTP 200. The body has status of ok.

FieldTypeDescription
tokensarray of objectThe tokens, empty when none were created.
tokens[].idstring (uuid)The token itself: the value you send as token in a body or header.
tokens[].expiresstringWhen the token stops working, as a UTC timestamp, or the string never for a token created without an expiry.

Errors

  • 400: The request body failed validation.
  • 401: The token is missing, expired or unknown.

A refusal can also come before the operation runs: an address outside your IP allowlist, a token bound to another address, or a body that is not valid JSON. See response format and errors.

Example

Request:

curl -X POST "<API_BASE_URL>/tokens" \
  -H "token: <your user token>" \
  -H "Content-Type: application/json"

Response:

{
  "status": "ok",
  "tokens": [
    {
      "id": "<token id>",
      "expires": "2027-01-01T00:00:00.000Z"
    },
    {
      "id": "<token id>",
      "expires": "never"
    }
  ]
}

Questions about tokens?

Write to us and we will help.

Talk to us