Using an API call:

ARTIFACTORY: Creating Access Tokens in Artifactory

AuthorFullName__c
Bassel Mbariky
articleNumber
000004927
ft:sourceType
Salesforce
FirstPublishedDate
2020-11-18T11:47:53Z
lastModifiedDate
2023-03-27
VersionNumber
10
To generate an Access token through a REST API call, follow these steps:

1. Create a token from the UI with the required permissions and copy the token or reference token.
2. Set the token as an environment variable. For example:
 export token="cmVmdGtuOjAxOjAwMDAwMDAwMDA6RWJzSm"
3. Use the following API call to create a token using the environment variable:
curl -H "Authorization: Bearer $token " -XPOST "http://artifactory-up:8082/access/api/v1/tokens" -d  '{"description" : "YOUR-DESCRIPTION", "token_id" : "YOUR-TOKEN-ID", "scope" : "applied-permissions/admin", "token_type" : "access_token", "include_reference_token" : "true"}' -H "Content-type: application/json"