---
title: "Get user tokens for current account"
method: GET
path: "/account/tokens"
tags: ["account"]
---

# Get user tokens for current account

`GET /account/tokens`

## Request

- Base URL: `https://api.anaconda.cloud/api`
- URL: `https://api.anaconda.cloud/api/account/tokens`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/anaconda/apis/anaconda-server-api/docs/account/tokens/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns the list of created token by this user, either `scope` or `resource` type.

## Response `200`

successful operation

- UserTokenList: The list of user tokens, either `scope` or `resource` types.
  - `items` union[]
    - union
      - UserResourceToken
        - `id` string: Id of the token in the system, not a token itself!
        - `name` string
        - `created_at` string
        - `expires_at` string
        - `metadata` object
        - `resources` UserTokenPermissionResourceItem[]
          - `resource_type` 'channel' | 'subchannel' | 'artifact', required
          - `resource_id` string, required: resource name
          - `permission` string, required
      - UserScopeToken
        - `id` string: Id of the token in the system, not a token itself!
        - `name` string
        - `metadata` object
        - `created_at` string
        - `expires_at` string
        - `scopes` string[]

## Other responses

- `401`: Unauthenticated, no token is provided or token is invalid
- `403`: Access is forbidden
- `500`: Internal server error

---

[API](https://skmtc.dev/anaconda/apis/anaconda-server-api.md) - [All operations](https://skmtc.dev/anaconda/apis/anaconda-server-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anaconda/apis/anaconda-server-api/revisions/6aef0cb7a151?raw)
