Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
SuryaMopuru
3 years agoExplorer | Level 3
What is the best way to check access token is expired
I need to know the most appropriate way to check my access token is expired or not? Can anyone suggest with an example
1 Reply
- Greg-DB3 years ago
Dropbox Community Moderator
When you retrieve a short-lived access token via /oauth2/token, the response includes the expiration information in the 'expires_in' field. You can store and refer to that information to check if the short-lived access token would be expired at any point in time.
To actively check if any particular access token is still valid though, you would need to perform an API call. For example, for user-linked access tokens, calling /2/check/user or /2/users/get_current_account would be good options, as those don't have any side effects. (Likewise, for team-linked access tokens, you could use /2/team/get_info.)
About 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!