As per the documentation here, the PUT endpoint /1.0/group-privileges is supposedly still active.
However, no matter what I do, I get a "Your credentials lack one or more required privilege scopes." when doing the HTTP PUT request to add privilege(s).
Let's say my team name is "myteam", I'm trying to add read permission for the devops group as so:
$ curl --request PUT --user myuser:APPpassword https://api.bitbucket.org/1.0/group-privileges/myteam/helloworld/myteam/devops --data read
I've also tried using the team UUID in the group-owner part of the API, similar to what I see going on the wire when using the web interface:
$ curl --request PUT --user myuser:APPpassword https://api.bitbucket.org/1.0/group-privileges/myteam/helloworld/{110e8400-e29b-11d4-a716-446655440000}/devops --data read
In both cases, I get an HTTP 403 back with the message "Your credentials lack one or more required privilege scopes."
If I add the devops group though the web UI, I can successfully read the group permissions with the above URLs and using an HTTP GET.
Since I can add the permission through the web, and read them through the API, it leads me to believe that 1) my account has sufficient permissions and 2) the URL is good since I can read from it.
What am I doing wrong?
Hello @Alexandre L,
Thanks for reaching out.
The privilege scopes that error is referring to are set for the app password you use to authenticate the request (when you created an app password you specified which things it can access). The endpoint and method in question requires account write scope, so I believe a new app password with that scope included should fix the problem.
Hope this helps.
Cheers,
Daniil
Yes, of course. Thanks for pointing it out!
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.