We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
ganeshpuli3
5 years agoExplorer | Level 3
How can we handle if the dropbox short living accesstoken expires in the middle of the API Request?
How can we handle if the dropbox short living accesstoken expires in the middle of the API Request?
here the scenario totally explained :-
dropbox short lived access token have expiring time...
Greg-DB
Dropbox Community Moderator
5 years agoYou do not need to apply any special logic for the expiration of an access token near the boundary of the expiration time; the Dropbox API servers will authenticate each request and either allow or reject it. For any given API request, the request will either be authenticated and then proceed, or it will not (e.g., if the access token is expired) and the call will be rejected. The call will be authenticated at the beginning of the request, and then the file upload will proceed. As long as you receive a successful API response, then the file was uploaded. If you receive an API error, then the file was not uploaded.
If the call is rejected, indicating that the short-lived access token is expired, you should then get a short-lived new access token for further calls. You can do so by having the user re-authorize the app, or if your app requested "offline" access, use the refresh token to get a new short-lived access token programmatically. You can find more information in the OAuth Guide and authorization documentation.
About Dropbox API Support & Feedback
Find help with the Dropbox API from 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!