account-tokens

List API tokens

List all tokens for the currently authorized account. The tokens are returned in a paged format, with the default page size being 20. The maximum page size is 100.

get/1.3/account/tokens

Request

  • Base URL: https://api.upcloud.com
  • URL: https://api.upcloud.com/1.3/account/tokens
  • Auth: HTTP bearer

Query parameters

limitinteger

How many tokens to return at per page

offsetinteger

Offset to start listing the tokens from

guiboolean
Example:true

Filter tokens based on GUI flag (true or false). Default is no value, i.e. no filtering and all tokens are returned.

sortstring
Example:+name,-created_at

Comma-separated list of fields to sort by. Prefix with '+' for ascending or '-' for descending order. Supported fields: created_at, expires_at, last_used_at, name. Example: sort=+name,-created_at. If no prefix is given, descending is assumed. Follows OpenAPI collectionFormat 'csv'.

Response

A paged array of tokens

idstring uuid

UUID of the token

namestring

The name of the token. Does not need to be unique.

created_atstring date-time

Token creation time.

expires_atstring date-time

The requested expiry time of the token, in RFC3339 format (2025-10-12T07:20:50.52Z). Needs to be in the future and maximum of 1 year in the future.

last_used_atstring date-time

The last time the token was used.

can_create_tokensboolean

Whether the token can create other tokens.

guiboolean

Token is for internal GUI use. Can not be used externally.

allowed_ip_rangesAccountTokensIpRange[]

List of IP ranges that are allowed to authenticate with the token. Empty list denies access from everywhere. If unset, the default list will be the IP filters of the account. If no IP filters are defined for the account either, the default will be ["0.0.0.0/0", "::/0"], i.e. allow from any address.

Example response

[
  {
    "id": "0c848138-2559-4562-9520-b1f22c4ae751",
    "name": "token",
    "created_at": "2025-03-25T13:46:19.502878Z",
    "expires_at": "2025-03-25T14:16:19.502644Z",
    "can_create_tokens": true,
    "allowed_ip_ranges": [
      "1.2.3.4"
    ],
    "gui": false
  },
  {
    "id": "0cc50c9d-6a81-494b-af8c-f7271cfd4d22",
    "name": "token",
    "created_at": "2025-03-25T14:12:06.534789Z",
    "expires_at": "2025-03-25T14:42:06.534342Z",
    "last_used_at": "2025-03-25T14:12:33.000692Z",
    "can_create_tokens": true,
    "allowed_ip_ranges": [
      "1.2.3.4"
    ],
    "gui": false
  }
]

Changes

No recorded changes to this operation across all 1 revision of this API.