Skip to content

List API Tokens ​

Retrieves a list of your API Tokens that can be used to authenticate API requests.

HTTP Request ​

GET {API_URL}/api-tokens

Query string parameters ​

ParametersRequirementsTypeDescription
limitOptionalintThe number of items to return
offsetOptionalintThe number of items to skip before starting to collect the result set
sortFieldOptionalstringThe field by which the data will be ordered
sortOrderOptionalstringSorting order: desc、asc

Reponse Attributes ​

status boolean ​

The status of the request to retrieve your API Tokens. true signifies success, while false indicates an error.

message string ​

A message describing the status of the request to retrieve your API Tokens

total int ​

Total records count

data object ​

Returns the data array of objects, each containing details about your API Tokens.

Each API Token specifies the following properties:

  • name: The name of the API Token.
  • token: The API Token value used to authenticate API requests.
  • description: An optional description of the API Token.
  • created_at: The timestamp when the API Token was created.
  • last_used: The timestamp when the API Token was last used. If the value is 0, it means it has never been used.
  • id: The API Token ID.

Example ​

Request ​

curl -X GET '{API_URL}api-tokens' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'refresh-token: {REFRESH_TOKEN}' \
-H 'Content-Type: application/json'

Response ​

{
    "status": true,
    "message": "Getting API Tokens success",
    "data": [
        {
            "name": "exascale-test-token",
            "id": "6707f627b4ff4e6387c91132",
            "description": "This is an example API Token",
            "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
            "created_at": 1728575015,
            "last_used": 1728610774
        }
    ],
    "total": 1
}