Hi,
As per Documentation i am trying to add group to repository via access token and i am getting following error
curl --request PUT \ --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/permissions-config/groups/{group_slug}' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "permission": "read" }'
message": "This API is only accessible with the following authentication types: apppassword, session"}}
Documentation
The Bitbucket Cloud REST API (atlassian.com)
I tried to do the same with app password and its working, however i want to achieve this with access token for automation, providing app password for organization level is not good idea, if in future my account is deactivated this Api will fail with app password authentication.