Skip to main content

Rotate a personal access token

POST 

/api/v4/users/tokens/rotate

Generate a new secret for an existing personal access token, immediately invalidating the old secret and any sessions that used it. The response includes the new token secret (shown once, like token creation).

Minimum server version: 10.10

Permissions

Must have create_user_access_token permission. For non-self requests, must also have the edit_other_users permission. To rotate a token belonging to a system admin, must also have the manage_system permission. OAuth sessions cannot use this endpoint.

Request

Responses

Personal access token rotation successful; response includes the new secret