Hi,
I'm green so need help. How oh how I can connect correctly from my script to Bitbucket to create / delete repositories (for now).
Habe so far this:
import requests
username = 'user@mail.com'
password = 'password'
headers = {"Content-Type": 'application/json'}
auth = (username, password)
bb_base_url = f"https://api.bitbucket.org/2.0/repositories/username/reponame"
res = requests.put(bb_base_url, headers=headers, auth=auth)
print(res)
Geting 401 code in responce. With same code just instead of put I'm using delete method I can delete repository created via web browser... What i'm doing wrong?
Hi, welcome to the Community!
For questions like this one, I recommend you to visit our Developer Community.
The users there are more familiar with this topic and you'll have more chances to find a suitable response.
Hope that helps,
Ana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.