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

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,559,022
Community Members
 
Community Events
184
Community Groups

Response error-403 on trying to fetch Bitbucket workspace members list using API.

I have been trying to fetch the list of Bitbucket users using API present for workspace members.

The API I have been using so far is - https://developer.atlassian.com/cloud/bitbucket/rest/api-group-workspaces/#api-workspaces-workspace-hooks-get

On running the following code: I am getting the response error -403

 

import requests
import json


username = "username"
password = "password"

headers = {
  "Accept": "application/json",
 
}

response = requests.request(
   "GET",
   url,
   headers=headers,
   auth= (username,password)
)

print(response)

1 answer

1 accepted

0 votes
Answer accepted
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 03, 2023

Hey @kompal_sithta ,

403 error means that  user is not an owner on the specified workspace

Fabio

Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 04, 2023

Hello @kompal_sithta ,

Just adding to Fabio's response, for the List users in a workspace  endpoint the 403 error can be returned in the following scenarios : 

  • You are not an Admin of the workspace in question
    • In order to get the list of members in a workspace through the API request, you need to be an Admin of the said workspace. 
  • The credentials you are using are lacking privileges :
    • To authenticate the API request, you will need to use the bitbucket account username along with an app password. For that particular API endpoint, the app password is required to have at least account:read permission selected.

Thank you, @kompal_sithta !

Patrik S

Suggest an answer

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

Atlassian Community Events