I can retrieve the permissions for a project using this REST call:
curl -u "admin:password" -X GET https://bitbucket.company.com/rest/api/latest/projects/FW/permissions/users?permission=PROJECT_ADMIN
but if I do the same query using a personal access token:
curl -H "Authorization: Bearer $PAT" -X GET https://bitbucket.company.com/rest/api/latest/projects/FW/permissions/users?permission=PROJECT_ADMIN
where $PAT is the value of the access token created for the 'admin' bit bucket user account, I get:
"You are not permitted to access this resource"
Hi John,
Can you check that the access token for the 'admin' user has been set up with the "Admin" level for the Projects?
To clarify, access tokens can be set up with a lower permission level compared to the one available for the user. See the Personal access tokens page for more details.
Cheers,
Caterina - Atlassian Support
Hi Caterina,
That was it thanks! :)
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.