Hi everyone, I am new here. So it might be the case that I am missing something. It would be of great help if someone could guide me through the process. I wrote the following python code to try and get a list of all the users associated with my organization:
from atlassian import Bitbucket
import os
class Driver():
def __init__(self):
self.base_url='https://bitbucket.org'
self.username = "admin"
self.app_password = os.environ.get('BITBUCKET_APP_PASSWORD')
self.bitbucket = Bitbucket(
url=self.base_url,
username=self.username,
password=self.app_password
)
def getVendorData(self):
response = self.bitbucket.get_users()
print(response.status_code)
print(response)
I have created the BITBUCKET_APP_PASSWORD for an admin account and have granted it literally all the permissions. Bit when I try to run the `getVendorData` method I get:
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://bitbucket.org/rest/api/1.0/use
rs?limit=25
Note: The app I am working on is still in a testing phase so I am using a free Bitbucket test workspace.
Thank you for your time