Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Required Email address during Bitbucket Rest 1.0 PUT operation for updating a file

Garudaprasad K
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!
October 7, 2023

Hi I'm using bitbucket 1.0 API in my daily activities, and we are trying to build a feature which can update a file from our app, and which uses repository HTTP Tokens, 

 

It works absolutely file when I use the tokens for read operations but when I apply the same in Write operations I get the below error:

"{"errors":[{"context":null,"message":"When performing an edit, the author must have an e-mail address.","exceptionName":"com.atl",
"assian.bitbucket.validation.ArgumentValidationException"}]}"

 

I checked most of the community answers but no where this problem or Solutions were given.

Please send me out an answer if there is any solution.

Right now my coding language is python and I'm using the http tokens as below:

 

headers = {
            'Authorization': f"Bearer {token}",
        }
NOTE: the token which I generated is a verified EDIT permission one.

1 answer

0 votes
Christian Glockner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 9, 2023

Hi,

Does the user who this token is associated with have an e-mail address?

Cheers,
Christian

Premier Support Engineer
Atlassian

Garudaprasad K
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!
October 13, 2023

Hi @Christian Glockner ,

 

Yes I'm the user and I created this in the repository, and I do have an email address.

it works fine when I use the format

Basic username:password, 

But not with the Bearer token.

Like ljubomirsinadinovski likes this
ljubomirsinadinovski
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!
February 29, 2024

Did u manage to resolve this, i stumbled on the same problem, I am trying using Bearer token as well? @Garudaprasad K @Christian Glockner 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events