Create non-admin API endpoint to generate and return personal access token

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Description

Currently there is no non-admin API endpoint to generate a personal access token for a GitLab user. This would be useful to have in order for scripts to automate GitLab tasks.

Proposal

Add a non-admin API endpoint that can create and return a personal access token for a user. The endpoint should take in the parameters that are needed in order to create a token through the web interface (namely scopes).

Links / references

https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html

https://docs.gitlab.com/ee/api

https://docs.gitlab.com/ee/api/#authentication

Use cases

Scripts to automate GitLab tasks

Edited Aug 28, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading