You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I am attempting to use one of the APIs to get a list of users that are members of a specific group.
It appears the /groups endpoint was deprecated in 1.0, and is not available in 2.0 API get, but there is also mention at the below link that the group endpoints are still available (as do a number of other community conversations).
Does this endpoint still exist?
How can I access it?
% curl -X 'GET' -H "Authorization: Bearer TOKEN" https://api.bitbucket.org/1.0/groups | jq
"message": "Token is invalid or not supported for this endpoint."
If it is a matter of permissions, where do those need to be set, as this token has full admin across all available resources for testing this.
Hello @alex ,
Thank you for reaching out to Atlassian Community!
The /1.0/groups endpoint is indeed still available until equivalent endpoints are still under the works for the 2.0 API.
From the error you shared, it seems like the access token you are using is either invalid or does not have the required scopes.
I was able to get the members of a group by making a request to the group's endpoint as in the following example:
curl -X GET https://api.bitbucket.org/1.0/groups/<workspace>/<groups>/members \
--header 'Authorization: Bearer ACCESS_TOKEN'
It's also possible to use Basic authentication by providing your bitbucket account username and an app password :
curl -u USERNAME:APP_PASSWORD -X GET https://api.bitbucket.org/1.0/groups/<workspace>/<group>/members
In this case, could you please confirm how exactly are you generating this access token? Is it by using an OAuth consumer ?
Thank you, @alex !
Thanks for the reply @Patrik S
We are generating the token on the Workspace Access Token page:
No combination of permissions is appearing to work.
We are also set up with SSO through atlassian cloud so basic auth isn't an option.
Really appreciate the time on this as it's the last piece of an audit puzzle :)
Unfortunately Workspace, Project, and Repository Access tokens are not currently supported on 1.0 endpoints.
In this case, you would need to either :
Let me know in case you have any questions.
Thank you, @alex !