GET/api/users/{userId}/tokens

List a user's tokens

Lists personal access tokens associated with a user. Use the userId path parameter to identify whose tokens to retrieve. Each result includes token details such as its name, creation date, expiration date, and creator.

1 parameter
userIdstringrequired
The unique identifier of the user whose tokens to list.

5 status codes
200Returns an array of personal access token objects, each containing its ID, name, expiration date, creator ID, and creation date; last-used date is also included when available.
created_atstringrequired
Date the token was created
created_bystringrequired
User ID of the user who created the token
expiration_datestringrequired
Date the token expires
idstringrequired
ID of a token
last_usedstringoptional
Date the token was last used
namestringrequired
Name of the token
400Returned when the request is invalid.
401Returned when the request lacks valid authentication.
403Returned when access to the requested operation is forbidden.
500Returned when the server encounters an internal error.

Error handling

A 400 is returned when the request is invalid; a 401 when authentication is missing or invalid; a 403 when access is forbidden; and a 500 when the server encounters an internal error. The userId path parameter must identify the user whose tokens you want to list.