Imran
Imran

Reputation: 81

Gitlab validation using personal access token

I need to validate the personal access token for gitlab. I know we can use the https://gitlab.example.com/api/v4/projects?private_token=<token> api to do so. But this api returns public projects when the private_token isn't specified.

I am looking at the scenario when the user does not have any associated projects to his name, and I need to validate his private token against gitlab.

Upvotes: 5

Views: 7639

Answers (1)

gurpal2000
gurpal2000

Reputation: 1082

Could you somehow make use of the /personal_access_tokens api call (See: https://docs.gitlab.com/ee/api/personal_access_tokens.html)

Upvotes: 2

Related Questions