GET/api/users/{userId}/tokens/{tokenId}

Get a user's token

Retrieves a specific personal access token associated with a user. Use userId and tokenId to identify the token. The response includes its name, creation date, expiration date, creator, and last-used date when available.

2 parameters
userIdstringrequired
The unique identifier of the user who owns the token.
tokenIdstringrequired
The unique identifier of the token to retrieve.

5 status codes
200Returns a personal access token object 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 identifies the user, and the tokenId path parameter identifies the token to retrieve.