You can create a personal access token (PAT) to authenticate in the CLI or with the API.
To create a personal access token, head to the project settings, then to personal access tokens
, then click generate token
.
Everybody in your organization can create a personal access token (PAT). To provide additional security, we highly recommend adding an expiration to your personal access tokens.
Note that not all endpoints in the API will be accessible with PAT authentication.
The PAT authentication is done via the HTTP Authorization request header.
Examples:
To maintain security, you may want to rotate your personal access tokens periodically. Follow these steps to rotate an existing token.
Requirements for Rotation
Use the following curl command to rotate a personal access token. Replace <personal-access-token-uuid>
with the UUID of the token you wish to rotate, and <personal-access-token>
with your current token.
This process will invalidate the previous token and return a new token with the specified expiration date.