Showing results for 
Show  only  | Search instead for 
Did you mean: 
Are you interested in hearing how one of our Community members uses Dropbox for sailing trips? Read all about it here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

Showing results for 
Show  only  | Search instead for 
Did you mean: 

Access token keeps expiring after few hours

Access token keeps expiring after few hours

dolphin automation
Explorer | Level 3

We use Dropbox API as follows


"grant_type" => "authorization_code",
"code" => code,
"redirect_uri" => redirect_uri,


We receive access_token, but after few hours they expire and user again has to go through Authorizaion process.

We read about refresh token. How can refresh tokens be used to retrieve short live token so that user does not have to go through authorization process. We use rudy SDK. It would be great if you can provide some sample code to use refresh token 

1 Reply 1

Dropbox Staff

Dropbox is in the process of switching to only issuing short-lived access tokens (and optional refresh tokens) instead of long-lived access tokens. You can find more information on this migration here.

Apps can still get long-term access by requesting "offline" access though, in which case the app receives a "refresh token" that can be used to retrieve new short-lived access tokens as needed, without further manual user intervention. You can find more information in the OAuth Guide and authorization documentation. You can find an example of using a refresh token to get a new short-lived access token, without manual interaction, here, under "Example: refresh token request".

For reference, while the creation of new long-lived access tokens is now deprecated, we don't currently have a plan to disable existing long-lived access tokens. (If that changes, we will of course announce that ahead of time.) That being the case, you can continue using existing long-lived access token(s) without interruption, if you have any. Also, note though that after the change you won't be able to create new long-lived access tokens.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?