The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
curl -X GET https://bitbucket.org/site/oauth2/authorize?client_id={my_client_id}&response_type=code
I use my own client_id above.
get refresh token code fails. There is no output. Even if I do -o output.txt
If I take this string and put in a browser I get the code. (fails using curl)
I need this automated using curl.
Hi David,
This code needs to be obtained from the browser, it is not possible to get it with curl. Please note though that this needs to be done once when you set up OAuth. Also, the call to get refresh tokens is different and you can use curl for that.
After you use this in a browser and get a code
https://bitbucket.org/site/oauth2/authorize?client_id={consumer_key}&response_type=code
then you can get an access token and a refresh token with a call like this:
curl -X POST -u "key:secret" https://bitbucket.org/site/oauth2/access_token -d grant_type=authorization_code -d code=huPPKResiPcsLaqjj4
The output will include an access token you can use for up to 2 hours and a refresh token.
You can then use the refresh token to generate a new access token and refresh token with the following call:
curl -X POST -u "key:secret" https://bitbucket.org/site/oauth2/access_token -d grant_type=refresh_token -d refresh_token={2Eoiw6UJ707AD9aIyUR}
This will give you another access token and refresh token. From then on, you can use the last call to generate new access and refresh tokens.
Please feel free to let me know if you have any questions.
Kind regards,
Theodora
Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.