# GET /tokens

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

UrbeStack release 0.2.35 API operation in the auth group.

List the caller's sessions and API tokens

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

The response lists the caller's active sessions and manually created API tokens in ascending ID order. Login challenges are excluded. Expired sessions disappear from the list at expiry and are deleted during nightly cleanup. Manually created API tokens remain listed after expiry until revoked.

## 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/tokens" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "server_time": "text",
  "timezone": "text",
  "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

- 401: Authentication required
