You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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.
Hello @Sachin !
Welcome to the Community!
Access tokens are indeed currently not supported in the Repository permissions endpoints, but we already have a feature request with our development team to add that authentication option to those endpoints :
We encourage you to Vote in that feature so our product managers can better understand the interest. If you would like to be notified whenever an update is posted on that feature, feel free to follow it by clicking on Start watching this issue option.
While that feature is not available, the authentication to the repository permissions endpoints are username and app password. One alternative is to create a new account to act as a "bot account" under which you can create the app password, so the password is not attached a an actual user account.
Thank you, @Sachin !
Patrik S
Thank you for the update, Pratik.
I have voted the same.
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.