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

Refresh oauth token on Bitbucket Server

Josh Hale August 22, 2017

Having obtained an oauth (v1) token from a Bitbucket Server, and used it to make various authenticated requests via the REST API, it appears that tokens are being revoked after some time.

 

Why are tokens revoked, is there a timeout?

 

Is there any way to obtain a new token without the user having to explicitly approve it? (or some other way to avoid the token being revoked)

1 answer

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 23, 2017

Hi Josh, access tokens do expire. If you got a refresh token then you can use it to get a new access token without requesting authorization from the end user.

For more information you can see Things you should know about tokens.

Hope that helps!

Ana

Josh Hale August 23, 2017

Thanks.

 

How do I get a refresh token from the Bitbucket Server REST API (or how do I get one along with the oauth_token)?

 

-Currently, when the user approves the oauth request and their browser requests http:://the.bitbucket.server/plugins/servlet/oauth/authorize they get a redirect to the registered URL ('my' site) with query parameters specifying the oauth_token and oauth_verifier. That is to say, I don't get a refresh token.

Raza Rafaideen May 10, 2018

How we can get a refresh token  with rest api ?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events