Bitbucket API 2.0 - list of private repositories

Viewed 5770
2 Answers

Because I got stuck, here a little complement @Łukasz Strzałka post.

To get an access token you have to create a consumer. It's described here https://confluence.atlassian.com/bitbucket/oauth-on-bitbucket-cloud-238027431.html (Thanks @Łukasz Strzałka)

enter image description here

  1. You have to go to your Team Account: Click on your user icon -> choose your Team -> Settings -> OAuth

  2. Add a consumer. The minimum is to set a title and a callback URL. Then you will get a key and a secret.

curl in terminal

curl -X POST -u "your_key:your_secret" \
https://bitbucket.org/site/oauth2/access_token -d grant_type=password \
-d username={username} -d password={password}

The response should be a token.

Related