---
title: "List tokens for a user"
method: GET
path: "/v0/users/{user}/tokens"
tags: ["users", "tokens"]
---

# List tokens for a user

`GET /v0/users/{user}/tokens`

List all API tokens for a user. Only the authenticated user themselves and server admins have access to this endpoint. By default, the tokens are sorted in alphabetical order by name. The HTTP response header `X-Total-Count` contains the total number of tokens.

## Path parameters

- `user` string, required

## Query parameters

- `direction` 'asc' | 'desc'
- `page` integer, nullable
- `per_page` integer, nullable
- `sort` 'name' — Sort by token name.
- `name` string
- `revoked` boolean, nullable
- `search` string

## Response `200`

successful operation

- JsonToken[]
  - `creation` string, date-time, required
  - `expiration` string, date-time, required
  - `name` string, required
  - `revoked` string, date-time
  - `token` string, required
  - `user` string, uuid, required
  - `uuid` string, uuid, required

## Other responses

- `4XX` — Error
- `5XX` — Error

## Changes

- **2026-04-20** `384ed3e1ff89` — 2 info
  - added the new optional `query` request parameter `revoked`
  - added the optional property `items/revoked` to the response with the `200` status
- **2026-03-20** `36c8ad753527` — 2 warning, 1 info
  - deleted the `query` request parameter `revoked`
  - removed the optional property `items/revoked` from the response with the `200` status
  - endpoint reactivated

[Change history](https://skmtc.dev/bencherdev/apis/bencher-api/changes/v0/users/:user/tokens/get.md)

---

[API](https://skmtc.dev/bencherdev/apis/bencher-api.md) · [All operations](https://skmtc.dev/bencherdev/apis/bencher-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/bencherdev/bencher-api/revisions/e275aaefcb34/schema)
