Rename a personal access token of the signed-in user. A logto-verification-id in header and the personal-access-tokens scope are required.
Responses
-
The personal access token was renamed successfully.
-
The request body is invalid, or the personal access token field is not editable in the account center.
-
Permission denied, the verification record is invalid or the access token does not include the personal-access-tokens scope.
-
The request was made by a third-party application.
-
The personal access token was not found.
-
The new token name already exists.
PATCH
/api/my-account/personal-access-tokens
curl \
--request PATCH 'https://[tenant_id].logto.app/api/my-account/personal-access-tokens' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"currentName": "string",
"name": "string"
}'
Request examples
{
"currentName": "string",
"name": "string"
}
Response examples (200)
{
"name": "string",
"createdAt": 42.0,
"expiresAt": 42.0
}