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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Broken Permissions on Repository Access Tokens?

Hi, I created a repository access token for my repo. I was able to read the issues of the repo without any issue (using the repo access token), but when creating an issue, I got this error:

 

{"type": "error", "error": {"message": "Your credentials lack one or more required privilege scopes.", "detail": {"required": ["issue:write"], "granted": ["runner:write", "repository:delete", "pullrequest:write", "pipeline:variable", "webhook", "repository:admin"]}}}

 

I tried this again with a new repo access token, giving it all possible permissions.  I did not see anything that says you can't use this token for this purpose. Could I please get some help?

1 answer

1 accepted

1 vote
Answer accepted
Ash Yadav - VMotion IT Solutions
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 05, 2023

Hi @Yasir Kusay 

 

Can you please provide a snippet of the repository permissions that you have configured for the access token? (feel free to blur out anything sensitive). 

See: https://support.atlassian.com/bitbucket-cloud/docs/repository-access-token-permissions/ 

 

Kind Regards,

Ash

No problem!

I ticked everything in that form.Screenshot from 2023-10-06 09-56-20.png

Ash Yadav - VMotion IT Solutions
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 05, 2023

Hi @Yasir Kusay 

 

Thank you! 

 

Interesting, can you please elaborate a bit more on what you meant by "creating an issue"?

Are you creating pull requests? 

This could possibly be related to branch permissions if you have any restrictions there. 

 

Kind Regards,

Ash

Certainly.

I am trying to use the API repository access token to create an issue from command line, i.e. I am running the below:



curl --request GET \ --url 'https://api.bitbucket.org/2.0/repositories/workspace/repository/issue' \ --header 'Authorization: Bearer REPOSITORY_ACCESS_TOKEN' \ --header 'Accept: application/json' \
--data '{
"title": "Test issue Title"
'}

 This is what is giving me the error.

 

{"type": "error", "error": {"message": "Your credentials lack one or more required privilege scopes.", "detail": {"required": ["issue:write"], "granted": ["runner:write", "repository:delete", "pullrequest:write", "pipeline:variable", "webhook", "repository:admin"]}}}

 

Running a command to fetch my issues however works fine.

Saxea _Flowie_
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.
Oct 05, 2023

Not supported yet, but there's a feature request for it: https://jira.atlassian.com/browse/BCLOUD-22603

Like # people like this

@Saxea _Flowie_ 

 

Oh, that makes sense. It also did not appear to work when I used it in `atlassian-python-api` module, even when just fetching issues.

Saxea _Flowie_
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.
Oct 05, 2023

@Yasir Kusay can I kindly ask you to accept the answer if you found it helpful?

Also, maybe you can use app passwords as they support issues scopes? https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/ 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events