Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can l get token from BitBucket OAuth

I'm trying to get a token through my OAuth application as written in the documentation, but I always get this error

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

My actions:

  1. I receive the code:

    https://bitbucket.org/site/oauth2/authorize?client_id={my_application_key}&response_type=code

  2. I want to receive a token for this code:

    curl -X POST -u "client_id: my_application_secret" https://bitbucket.org/site/oauth2/access_token -d grant_type=authorization_code -d code={code}

Maybe I'm missing something?

like image 670
Otto Bismarck Avatar asked Nov 19 '25 20:11

Otto Bismarck


1 Answers

Replace all your client_id and secret with the consumer key and consumer secret respectively generated from your Bitbucket Settings' OAuth.

When you've successfully authorized your integrating app and generated the access_token via: https://bitbucket.org/site/oauth2/access_token , you should receive an access_token.

like image 121
Anne Calantog Avatar answered Nov 22 '25 03:11

Anne Calantog



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!