Dropbox: token expiring and not being refreshed

I have been using Duplicacy CLI for a long time now with OneDrive and everything worked very well with the auth token.

I recently moved to Dropbox and am seeing an issue where the token expires and does not get refreshed. Am I missing a configuration setting to enable automatic refresh of the oauth2 token perhaps? I checked the documentation and the forums and did not find anything.

I used Dropbox Token for Duplicacy to generate the auth token and then put it into the preferences file under: “keys”: { “dropbox_token”: “xxxxxx” }

The backup runs for a few hours and then stops with the following message:

Failed to upload the chunk cad5914d1ca7ea06aeabf8a8e21b73c938dedd11ca66014f940f8a5de0dcc876: expired_access_token/..
Incomplete snapshot saved to /backup/duplicacy/dropbox/.duplicacy/incomplete

Thank you!

It looks like Dropbox only gives out tokens that expire after 4 hours. Can you try to create your own app as Dropbox Developer and then generate a new access toke?

Thanks! I created a Dropbox App and tried it that way. Same result.

From reading the documentation while I was creating the permissions, it looks like Dropbox used to usetokens that never expired. Then they implemented refreshing access tokens. They allowed the old-style tokens for a transition time, but it looks like they have ended that transition time.

So I think the only way to use a token longer than 4 hours will be to refresh it when it expires.

There was an Access token expiration option with which you can select long-lived tokens but now that option is gone.

I’ll work on a new version that can refresh the token.

1 Like

Thank you for working on the refresh-token feature, much appreciated! I will be happy to test it out if you need a volunteer.