Forum Discussion

andrejpet's avatar
andrejpet
Explorer | Level 4
3 years ago

Access token generated with refresh token got permissions revoked

As per the dropbox offline flow, I've set up a flow where I've generated a refresh token after the owner of the dropbox (me) 
- Generated an access code using this URL
https://www.dropbox.com/oauth2/authorize?client_id<YOUR_APP_KEY>&response_type=code&token_access_type=offline
- Used the access code to generate a token using this request
curl https://api.dropbox.com/oauth2/token -d code=<ACCESS_CODE> -d grant_type=authorization_code -u <APP_KEY>:<APP_SECRET> 

I was succesfully generating an access token with the refresh token that I got and my files were being uploaded.
After a month I come back and I get errors that my token no longer has permissions to do so.
This should not be the case since I did not set an expiration date on the refresh token or revoked any permissions.

Because this flow starts with an owner interaction, it cannot be restarted with an app in production as many uploads will be lost.
A new refresh token was generated and it all works now, but again I don't want this to happen in production.

How do I solve the issue?

12 Replies

Replies have been turned off for this discussion

About Discuss Dropbox Developer & API

Node avatar for Discuss Dropbox Developer & API
Make connections with other developers

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

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, Facebook or Instagram.

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!