Memos

List Personal Access Tokens

ListPersonalAccessTokens lists a user's personal access tokens (PATs), without their token values. PATs are long-lived tokens for API and script access, distinct from short-lived JWT access tokens. The user and admins may call it.

GET
/api/users/{user}/personalAccessTokens

Path Parameters

user*string

The user id.

Query Parameters

pageSize?integer

Optional. The maximum number of tokens to return. The service may return fewer. Currently ignored; all tokens are returned in one page.

Formatint32
pageToken?string

Optional. A page token from a previous call. Provide it to retrieve the next page.

Response Body

application/json

application/json

curl -X GET "https://example.com/api/users/string/personalAccessTokens"
{  "personalAccessTokens": [    {      "name": "string",      "description": "string",      "createTime": "2019-08-24T14:15:22Z",      "expireTime": "2019-08-24T14:15:22Z",      "lastUseTime": "2019-08-24T14:15:22Z"    }  ],  "nextPageToken": "string"}