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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.