Where is my user ID in GitLab.com?



When calling GitLab.com’s Add a member to a group or project API to add an user as the member to a project, the user ID (integer) must be provided. Where can GitLab.com users get their user ID’s?

I can not find mine here and here.



Try opening your browser and going to this URL:


where YOUR_USERNAME is your username.

:point_right: This will only work if you are already logged into GitLab.


  1. Go to https://gitlab.com/profile/account

  2. Copy your Personal Access Token.

  3. Run the following command from a terminal:

    curl --header "PRIVATE-TOKEN: TTTT" https://gitlab.com/api/v4/users?username=YOUR_USERNAME

where TTTT is your private token and YOUR_USERNAME is your username.



Thank you a lot!

It will be nice to see this instruction be added to FAQ.