It is possible to get all user repositories using Bitbucket API 2.0 including private repositories? When I use https://api.bitbucket.org/2.0/repositories/{username} i got only public.
It is possible to get all user repositories using Bitbucket API 2.0 including private repositories? When I use https://api.bitbucket.org/2.0/repositories/{username} i got only public.
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)
You have to go to your Team Account: Click on your user icon -> choose your Team -> Settings -> OAuth
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.