Getting your private token for the API
GitLab has a powerful API system; almost all the actions you can perform in the web interface can also be done via the API. In order to use the API, you need to get your private token from GitLab. In this recipe, we will see where you can find your token and how you can regenerate an existing token.
How to do it…
In the following steps, we will create our private token for the API:
Log in to your GitLab instance.
Click on Profile settings.
Click on Account.
Here, you can find your private token:
If you need to reset your token because it has been compromised, you can do so by clicking on the Reset button.
GitLab will now generate a new token for you.
How it works…
The private token is used for all the API requests; it's a replacement for the username/password combination. You have to make sure that your private token is kept secure; the same way you have to make sure your username/password is secure.
When you have the feeling your token has been compromised, you...