GET/v2/pats/current

Get the current personal access token

Retrieves the personal access token associated with the authentication used for the request. Use this endpoint to inspect the current token's metadata and the user who created it. The request must be authenticated with a personal access token.

5 status codes
200Returns the current personal access token's metadata, including its identifier, description, creation and update times, optional expiration and last-used times, and the user who created it.
createdAtintegerrequired
descriptionstringrequired
expiresAtintegeroptional
idintegerrequired
lastUsedAtintegeroptional
updatedAtintegerrequired
userobjectrequired
User who created the comment
400Returned when the request is not authenticated with a personal access token.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
401Returned when the request is not authenticated.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
403Returned when the authenticated user is not permitted to access the token details.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
404Returned when the current token cannot be found.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional

Error handling

A 400 is returned when the request is not authenticated with a personal access token. A 401 is returned when the request is not authenticated, and a 403 when the authenticated user cannot access the token details. A 404 is returned when the current token cannot be found.