I am trying to make a DELETE API request to the endpoint /repositories/{workspace}/{repo_slug}/permissions-config/groups/{group_slug}, as per the documentation I have created an App Password and am trying to make the request using the Bearer token but I get the following response:
{
"type": "error",
"error": {
"message": "Token is invalid or not supported for this endpoint."
}
}
I set the scopes for the token as below and I am workspace admin, but I have so far been unsuccessful making this request.
Hi Alex!
An app password cannot be used as a Bearer token. It is a type of password, so the authentication method needs to be Basic Auth and the account's username needs to be provided as well.
You can find the Bitbucket username on the following page, after logging in to the account you generated the app password for:
An example call with curl and Basic Auth is the following:
curl -u bitbucket_username:app_password --request DELETE \
--url 'https://api.bitbucket.org/2.0/repositories/workspace-id/repo-slug/permissions-config/groups/group-slug'
The values in bold need to be replaced with the values of your own username, app password, workspace ID, repo, and group.
Please feel free to let me know how it goes.
Kind regards,
Theodora
Hi @Alex White ,
I would recommend asking this question in the Atlassian Developer Community here: https://community.developer.atlassian.com
That community is focussed on developers building apps for the Atlassian platform, they will have more experience with calling APIs and helping you figure out this problem.
Cheers,
Peter
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.