# GET /users/{name}/tokens

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the users group.

List a user's sessions and API tokens

- Who may call it: administrator, reseller
- Token scope, any of: users, read, all
- Answers: 200 OK

Administrators can list tokens for any account. Resellers can list tokens for their own account and their customers' accounts. The tokens array contains unexpired sessions and manually created API tokens in ascending id order. Expired API tokens remain in the list. Login challenges are excluded.

## Parameters

- `name` (path, Username, required)

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X GET "$API/users/alice/tokens" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "tokens": [
    {
      "address": "info@example.com",
      "created_at": "2026-09-09T10:15:00Z",
      "expires_at": "2026-09-16T10:15:00Z",
      "id": 1,
      "kind": "session",
      "label": "my laptop",
      "opened_by": "text",
      "plugin": "text",
      "scopes": [
        "read"
      ],
      "user": "alice",
      "user_agent": "text"
    }
  ]
}
```

## Errors

- 400: Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
- 400: Username '<value>' is reserved
- 401: Authentication required
