Skip to main content
List tokens registered in the system. Requires token:list or token:* permission. By default, only valid (non-expired, non-revoked) tokens are returned.

Query parameters

token_id
uuid
Filter by specific token ID.
issuer
string
Filter by token issuer.
subject
string
Filter by token subject.
include_invalid
boolean
default:"false"
Include expired and revoked tokens in results.

List all valid tokens

// TODO: Add TypeScript SDK example for listing tokens
{
  "tokens": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "issuer": "trelent-data-ingestion",
      "subject": "my-service",
      "created_at": "2024-12-01T10:00:00Z",
      "expires_at": "2024-12-02T10:00:00Z",
      "revoked_at": null,
      "is_valid": true
    }
  ]
}

Response fields

tokens
array
List of token information objects.

Filter by subject

curl -X GET "${API_URL}/v1/token/list?subject=my-service&include_invalid=true" \
  -H "Authorization: Bearer ${API_TOKEN}"