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?
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
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not supported yet, but there's a feature request for it: https://jira.atlassian.com/browse/BCLOUD-22603
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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/
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.