Forum Discussion

Здравко's avatar
Здравко
Legendary | Level 20
2 years ago

Re: What's the correct way to handle expired access token


Greg-DB wrote:

...

It looks like you're using the Dropbox Java SDK, so if you're interested, you can see where the Java SDK handles this error internally for you here.


Greg, it's almost impossible code flow to reach to there (or should be, at least). It's something like emergency way, used by exception if something in regular flow fails. Regular refresh happens here. 🙂

It's better serialization to be performed using the appropriate writer, part of the credential object, not fetching the fields one by one. 😉 Updating access token without moment of expiration is meaningless.

Replies have been turned off for this discussion

About Dropbox API Support and Feedback

Node avatar for Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.

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!