Community Announcements have moved! To stay up to date, please join the new Community Announcements group today. Learn more
×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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.