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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

unauthorized_client when trying to authenticate via API for Bitbucket Cloud

I'm trying to use the Bitbucket API but I can't seem to authenticate. I'm using the sample cURL snippet that is displayed in the docs for 3. Resource Owner Password Credentials Grant (4.3).


I'm replacing username with my email address and password with my password like this:


curl -X POST -u "client_id:secret" -d grant_type=password -d -d password=my5password1


The response I get back is always:


{"error_description": "Invalid OAuth client credentials", "error": "unauthorized_client"}


I'm not sure what is going wrong. I've tried changing my password and using my username instead of my email address. I don't have two-step-verification enabled.


What else can I do to verify that my settings are correct?


Thanks a lot for your help! :)

1 answer

1 accepted

5 votes
Answer accepted

I had to add an OAuth consumer in my account settings and replace "client_id:secret" with the information frmo the OAuth consumer.

How did you define the consumer?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,741 views 10 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you