We can create a transient user with an access token. The advantage of access tokens is the fact that you do not have to create a user in Artifactory to use them. When creating a token, you can specify a user name that does not exist in Artifactory, and Artifactory will create a transient user that will only exist as long as the token is valid(We can specify while creating an access token).
To create a Transient user go to Administration → Identity and Access → Access Tokens → Generate Token. Here you can specify the service to which the user can have access(if only to Xray REST API) and set the expiration time.

Two ways to use access tokens for authentication. For example:
Basic Authentication
Authorization Headers
To create a Transient user go to Administration → Identity and Access → Access Tokens → Generate Token. Here you can specify the service to which the user can have access(if only to Xray REST API) and set the expiration time.
Two ways to use access tokens for authentication. For example:
Basic Authentication
curl -u<USERNAME>:<TOKEN> <Xray url>/xray/api/v2/watches
Authorization Headers
curl -H"Authorization: Bearer <TOKEN>" <Xray url>/xray/api/v2/watches