Project admins can create access tokens that are tied to the projects in which they hold administrative privileges.
These tokens are associated with specific roles within the project, which provide the same permissions as the given project roles have at the time the token is used. The token gets access to all Artifactory resources (builds, repositories, and artifacts).
You can provide the project and role when you create new tokens.
The following example show how to use Create Token API.
curl -H "Authorization: Bearer <valid access token>" -XPOST "http://localhost:8082/access/api/v1/tokens" -d "scope=applied-permissions/roles:project-key:developer,qa"
The following example shows the response from Get Token API.
The project field appears in the response only if the token was created by a project admin.
{ "tokens": [ { "token_id": "<id>", "subject": "<subject>", "expiry": <epoch-in-secs>, // optional "issued_at": <epoch-in-secs>, "issuer": "<issuer>", "description": "<description>", // optional "refreshable": <true|false>, "project": “project-key”, }, ... ] }