OAuth expiration time

Hello there!


To give some context of what I'm trying to do, I have a python framework which I install via pypi with pip install git+<repo-link>,  the repo that I'm using is private, and, unfortunately, it needs to remain that way. 

I though of doing with SSH, but that would make my life a little bit harder.

So I tried to create a OAuth2 consumer for giving a link to clone the framework, via the OAuth token.  The problem is that, the token have a expiration time of 1 hour.

I was wondering if I can create a non-expiring OAuth token, or if there is a better way to complete that pypi flow with a private repo.

Thank you.

1 answer

0 vote

Hi Rodrigo, our access tokens expire in one hour. Most access token include a refresh token that can then be used to generate a new access token, without the need for end user participation:

$ curl -X POST -u "client_id:secret"
  https://bitbucket.org/site/oauth2/access_token \
  -d grant_type=refresh_token -d refresh_token={refresh_token} This is documented at 

This is documented at Oauth on Bitbucket Cloud.

Hope that helps!


Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

2,035 views 1 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you