Docs

List my personal access tokens

GET
/users/me/personal_access_tokens

Lists the personal access tokens of the person the credential belongs to, newest first, expired ones included, paginated with limit and page_token. A record never holds the token.

Authenticate with a console session cookie, an access token issued for the person, or one of their personal access tokens; a token needs the scope personal_access_token.read.

Authorization

headerAuthorizationBearer <token>

Scope: personal_access_token.read

Query Parameters

limit?integer

Maximum number of items to return.

Range1 <= value <= 100
Default20
page_token?string

Token for fetching the next page of results. Obtain this value from next_page_token in the previous response. Omit to start from the beginning. Its format is opaque and may change between releases.

Response Body

A page of the caller's personal access tokens.

application/json
  1. response

A page of the caller's personal access tokens, newest first, expired ones included.

personal_access_tokens*array<>
next_page_token?|

Token to pass as page_token in the next request to fetch the following page. Present when the page was full. A following request may return an empty page and no token, which ends the listing.

Example Request
import { configureZitadel, getApi } from "@zitadel/api/config";// In the browser, through the SDK proxy: the session cookie authenticates the call.const api = getApi(configureZitadel({ projectId: "proj_01KWH1P4MYS7F0N9WD3P2E4YM5" }));const myPersonalAccessTokens = await api.listMyPersonalAccessTokens();
Example Response
{  "personal_access_tokens": [    {      "id": "string",      "name": "string",      "scopes": [        "string"      ],      "created_at": "2019-08-24T14:15:22Z",      "expires_at": "2019-08-24T14:15:22Z",      "client_id": "string"    }  ],  "next_page_token": "string"}

Was this helpful?