Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


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!


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
Community Members
Community Events
Community Groups

I can't request bitbucket rest api with right username and password, and the status code is 403.



when I use bitbucket rest api like{workspace}/ to get repositories, the return status code is 403 and content is 'b'Too many invalid password attempts. Log in at to restore access.\n''.

But my username and password is right , I can use them login 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_AUTH = HTTPBasicAuth(username, password)
BITBUCKET_HEADERS = {"content-type": "application/json"}

response = requests.get(f"{worksapce}/",
"pagelen": 100



please help me! Any help would be highly appreciated.

Thanks in advance!

1 answer

1 accepted

0 votes
Answer accepted

Hey Yue!


The error which you have specified indicates to me that Git is unable to authenticate the password associated with the user.
I have some suggestions:
  1. Reset the password associated with the account if you intend to use regular username/password basic auth (this is being deprecated on 01/03/22): 
  2. If this does not work, instead of using the normal account password can you try setting up an App Password and replacing the basic password with the app password?
  3. To set up the App Password, you can navigate to the account settings here once logged into that account -
    You can create the App Password and give it the permissions it needs accordingly.
If the regular password has been changed instead (option 1), please ensure it is cleared from any applications/GIT clients, keychain access (Mac), credential manager (Windows), deleted from /etc/shadow directory (Linux).
Let me know if this helps.
- Ben (Bitbucket Cloud Support)

Thank you for your help! Your second resolution can work, first not!

Thank you again!

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events