GitLab API

GitlabTool

Actions1095

Personal_access_tokens → deleteApiV4PersonalAccessTokensId

AI-generated

Summary

Delete a personal access token from GitLab by its ID to revoke its access rights.

Inputs

  • Id (required) — The unique identifier of the personal access token to delete.
  • Skip Authentication — Whether to skip using the configured GitLab API authentication credentials (default is false).
  • baseUrl — The base URL of the GitLab instance; defaults to https://gitlab.com.

Output shape

no body — success/failure only

The operation performs an HTTP DELETE request to /api/v4/personal_access_tokens/{id}. If successful, it returns no content, indicating the token has been deleted. Errors are returned according to GitLab API conventions.

Examples

Example 1: Revoke a specific personal access token by providing its numeric ID to ensure it can no longer be used for API operations.

Set the "Id" path parameter to the token's ID. Optionally specify a custom baseUrl if targeting a self-hosted GitLab instance.

Links

Discussion