## GET /v1/user/tokens

List your own user tokens on this account newest first, expired and revoked tokens included. A token's secret is never returned.

Required permissions: read:user.
API key: Requires a CLI user token.
CLI user token: Supported.
Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
Higher permission levels include lower levels: read < write < delete.

### Response

```text
{
  "user_tokens": [
    {
      "created_at": str,
      "expires_at": str,
      "id": str,
      "last_used_at": str,
      "name": str,
      "revoked_at": str
    }
  ]
}
```

### Python

```python
import os

from ellipsis import Ellipsis

client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])

result = client.user.tokens.list()
print(result)
```

### TypeScript

```typescript
import { Ellipsis } from '@ellipsis-dev/sdk';

const client = new Ellipsis({
  apiKey: process.env.ELLIPSIS_API_TOKEN!,
});

const result = await client.user.tokens.list();
console.log(result);
```

### cURL

```bash
curl "https://api.ellipsis.dev/v1/user/tokens" \
  -H "Authorization: Bearer $ELLIPSIS_API_TOKEN"
```

### Response schema

```json
{
  "properties": {
    "user_tokens": {
      "items": {
        "properties": {
          "created_at": {
            "type": "string"
          },
          "expires_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "created_at",
          "expires_at",
          "last_used_at",
          "revoked_at"
        ],
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "user_tokens"
  ],
  "type": "object"
}
```
