Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

401 Unauthorized issue with basic auth

Ankit Singh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 14, 2025

In my Postman whenever i am adding my Bitbucket details, then am getting 401 Unauthorized.

 

Steps am taking-

1) Using Get in Postman and using this as url - https://api.bitbucket.org/2.0/user

2) In Authorization, i have selected basic auth. 

3) In username, i have added my Bitbucket account username and in password i have added the API key i have. 

4) When clicking on Send, i am geting 401 Unauthorized

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 15, 2025

Hi Ankit and welcome to the community!

When you say API key, do you mean an API token?

If so, username + API token is not going to work with Bitbucket Cloud APIs. You will need to use Atlassian account email + API token instead. You can find your Atlassian account email address on this page: https://bitbucket.org/account/settings/email/.

Reference:

Please also keep in mind that the token will need to have the necessary scopes. API tokens without scopes will not work with Bitbucket Cloud APIs. For this specific endpoint you want to use, the token will need to have the scope read:user:bitbucket.

If you select a certain endpoint from the left sidebar in our API documentation, you'll be able to see the API token scopes required for that endpoint.

Please feel free to let me know if you have any questions.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events