EndpointsGet an API token

API Tokens

Get an API token

Returns the metadata of one of your API tokens.

GET/api_tokens/{id}
Authorizationstringheaderrequired

Bearer token for the authenticated caller.

idstringrequired

API token ID.

Required string length: 3 - 54

Example: "tok_3k9x2mfq8a1b7c4d5e6f"

Response

application/json

Token metadata

idstringrequired

API token ID.

Required string length: 3 - 54

Example: "tok_3k9x2mfq8a1b7c4d5e6f"

namestringrequired

Required string length: 1 - 100

Example: "My CLI token"

prefixstringrequired

The first 12 characters of the token, for recognizing it. Never the secret.

Example: "sk_akua_a3B2"

workspace_idstring | nullrequired

The only Workspace the token may act in. Omitted or null: every Workspace the person may use.

Required string length: 2 - 53

Example: "ws_j572abc123def4"

rolesstring[] | nullrequired

A ceiling of IAM roles: the token may do only what one of these roles includes, and only what the person may. Omitted or null: the rights of the person.

Required array length: 1 - 16 elements

Example: ["roles/viewer"]

created_atintegerrequired

Unix timestamp (seconds)

Required range: x >= 0

last_used_atinteger | nullrequired

Unix timestamp (seconds) of last use, or null if never used

Required range: x >= 0

expires_atinteger | nullrequired

Unix timestamp (seconds) when the token expires, or null if never

Required range: x >= 0