Adding User to project using bitbucket rest api responds with 403 error

Mansi Patel May 18, 2018

Hi,

I am trying to add user to bitbucket project using rest api, but get 403 error. I have sys admin access to that instance.

-bash-3.2$ curl -u ****:*** -X PUT "https://*****/REST/API/1.0/PROJECTS/CAR/PERMISSIONS/USERS?NAME=user1&PERMISSION=PROJECT_READ"

Error:

The server understood the request but refuses to authorize it.

I am completely out of ideas and surprised with this response. Any help is appreciated.

1 answer

0 votes
Edwin Kyalangalilwa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 20, 2018

Hi @Mansi Patel,

This is the explanation from the documentation.

Screen Shot 2018-05-20 at 23.59.46.png

Mansi Patel May 21, 2018

I checked that documentation and user which I am trying is not part of this project or has any higher global level permission.

When I try the same operation from UI, it works fine. but from rest api it results in 403 error.

Thanks

Mansi

Cory Galloway August 14, 2018

I get the same when adding a group.

Picky
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 6, 2019

When I'm trying to upload the plugin using sys admin access, I'm also getting 403 error whereas UI its working fine.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events