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
Next: Root
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
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
hello!
when I use bitbucket rest api like https://api.bitbucket.org/2.0/repositories/{workspace}/ to get repositories, the return status code is 403 and content is 'b'Too many invalid password attempts. Log in at https://id.atlassian.com/ to restore access.\n''.
But my username and password is right , I can use them login https://id.atlassian.com/ through broswer.
I use python package requests do my request, the code like this:
from requests.auth import HTTPBasicAuth
import requests
username = "{username}"
password = "{password}"
email = "{email}"
worksapce = "{worksapce}"
BITBUCKET_URL = "https://api.bitbucket.org/2.0"
BITBUCKET_AUTH = HTTPBasicAuth(username, password)
BITBUCKET_HEADERS = {"content-type": "application/json"}
response = requests.get(f"https://api.bitbucket.org/2.0/repositories/{worksapce}/",
params={
"pagelen": 100
},
auth=BITBUCKET_AUTH,
headers=BITBUCKET_HEADERS)
print(response.status_code)
print(response.content)
print(response.json())
please help me! Any help would be highly appreciated.
Thanks in advance!
Hey Yue!
Thank you for your help! Your second resolution can work, first not!
Thank you again!
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.