Skip to content

List API Tokens

GET
/tokens/

👤 Authentification Utilisateur Requise

Ce point d’accès permet à l’utilisateur actuellement authentifié de lister tous ses jetons d’API persistants.

Cela est utile pour voir les jetons actifs, vérifier leur date de création ou d’expiration, et récupérer leur id ou leur token_prefix en vue de les supprimer.

skip
integer

The number of items to skip from the beginning of the result set. This is used for pagination, often referred to as the ‘offset’.

limit
integer

The maximum number of items to return in the response. This is used to control the page size.

Example
100

Successful response (inferred from assertions)

object
data
required
Array<object>
object
id
required

The unique numeric identifier for the token record. Use this ID to revoke (delete) the token.

integer
Example
42
name
required

The human-readable name provided by the user for this token.

string
Example
My Production Server Key
token_prefix
required

The non-secret prefix of the API token. This can be used to identify which token was used in logs or user interfaces without exposing the full secret credential.

string
Example
authotk_a1b2c3d4
is_active
required

Indicates if the token is currently active. API requests using an inactive token will be rejected.

boolean
Example
true
expires_at
required

The ISO 8601 timestamp for when this token will automatically expire. A null value indicates it never expires.

string format: date-time
nullable
Example
2026-01-01T00:00:00Z
last_used_at
required

The ISO 8601 timestamp of the last successful authentication using this token. Will be null if it has never been used.

string format: date-time
nullable
created_at
required

The ISO 8601 timestamp of when the token was originally created.

string format: date-time
Example
2025-11-19T10:30:00Z
pagination
required
object
total_items
required

The total number of items available in the entire dataset that match the query, across all pages.

integer
total_pages
required

The total number of pages calculated from total_items and per_page. A client can use this to build page navigation UI.

integer
current_page
required

The page number for the current set of items being returned. This is typically controlled by skip and limit or page and size query parameters.

integer
per_page
required

The maximum number of items configured to be returned on a single page. This is typically controlled by a limit query parameter.

integer
Example
{
"data": [
{
"id": 2,
"name": "My Awesome Token",
"token_prefix": "authotk_62d2daca",
"is_active": true,
"expires_at": null,
"last_used_at": null,
"created_at": "2025-11-13T17:23:41.430738+01:00"
}
],
"pagination": {
"total_items": 1,
"total_pages": 1,
"current_page": 1,
"per_page": 100
}
}