An API (Application Programming Interface) token is a unique identifier used for authentication when accessing an API. It is necessary because it allows secure communication between different software applications and ensures that only authorized users can access the API. In summary, an API token is important because it helps maintain security and control access to sensitive data and functionalities within an application.
Step 1: Click on your avatar at the bottom left corner and select Profile Settings.
Step 2: Navigate to "Access Tokens" from the top menu on the Profile Settings page. Click on the "Generate Token" button to create a new token.
Step 3: In the modal that shows up, enter a name for your token and choose what it can do.
If you choose "read", it will only do download actions; if you choose "write", it will also do upload actions via API and CLI. Both scopes can be used together.
Having a meaningful name for your token will allow you to easily find out which token is the computer, the server, the CI/CD, or the token you accidentally expose. Yeah. It sounds bad, but it happens.
Step 4: Copy the issued token. Done, and that's all.
Tokens can only be seen once generated. So do not forget to save it to be able to use it. You can also edit the name and scope or revoke your token here.