You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

ralph86's avatar
ralph86
Explorer | Level 3
8 years ago

API v2 access token validity

Hi,

 

We're upgrading from v1 to v2 and the new oauth2 is still not clear to me.

On the API documentation pages it says that the code authorization flow gives you the access token (after you used the given code) and there is also told about a refresh token? That implies that the access code now has a expiration date? I hope not.

I thought that the access tokens (for use as authorization bearer) were valid until revoked by user?
So where are the refresh tokens for or are they optional? Can we just use the access tokens and use that until our customer revokes access? If not, how does the refresh tokens work? Please give some PHP / cURL examples if the refresh tokens are required.

 

Thank you in advance!

 

  • The Dropbox API OAuth 2 implementation does not use refresh tokens. (Can you link to the part of the documentation that was confusing? We can look into clarifying it.)

    Dropbox API OAuth 2 access tokens don't expire, but can be revoked at any time by the user or app.

    Note that "authorization codes" are different, and do expire after a few minutes. They should only be used immediately once to get an access token.
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff
    The Dropbox API OAuth 2 implementation does not use refresh tokens. (Can you link to the part of the documentation that was confusing? We can look into clarifying it.)

    Dropbox API OAuth 2 access tokens don't expire, but can be revoked at any time by the user or app.

    Note that "authorization codes" are different, and do expire after a few minutes. They should only be used immediately once to get an access token.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,915 PostsLatest Activity: 6 years ago
333 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!