List API Tokens
Retrieve a comprehensive list of available API Tokens associated with your account for API request authentication.
HTTP Request
GET
{API_URL}/api-tokens
Query Parameters
Parameter | Requirement | Type | Description |
---|---|---|---|
limit | Optional | int | Maximum number of records to return per request |
offset | Optional | int | Number of records to skip for pagination |
sortField | Optional | string | Field identifier for result ordering |
sortOrder | Optional | string | Sort direction: desc (descending) or asc (ascending) |
Response Structure
status boolean
Operation result indicator. Returns true
for successful execution, false
when encountering an error.
message string
Descriptive response indicating the outcome of the token retrieval request.
total int
Aggregate count of available records.
data object
Returns an array of token objects, each containing the following attributes:
name
: Token identifiertoken
: Authentication credential for API requestsdescription
: Optional contextual informationcreated_at
: Token generation timestamplast_used
: Most recent usage timestamp (0 indicates unused)id
: Unique token identifier
Implementation Example
Request
bash
curl -X GET '{API_URL}api-tokens' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'refresh-token: {REFRESH_TOKEN}' \
-H 'Content-Type: application/json'
Response
json
{
"status": true,
"message": "API Tokens retrieved successfully",
"data": [
{
"name": "rich-test-token",
"id": "6762a94b91e67919c066540d",
"description": "Production environment API token",
"token": "eyJlbWFpbCI6InRlYW1AZXhhYml0cy5haSIsInVzZXJuYW1l...",
"created_at": 1735475573,
"last_used": 1735475774
}
],
"total": 1
}