We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
luigia
5 years agoExplorer | Level 4
short-lived token expired
I'm updating my code to use dropbox-core-sdk-3.1.5 instead of dropbox-core-sdk-3.1.1. I've updated my app permission to use the short-lived access token in the Dropbox Console.
When a user login i...
luigia
5 years agoExplorer | Level 4
yes, my app needs to interact with the Dropbox API without user input.
What do you mean with "SDKs automating this for you" ?
I'm using the sdk 3.1.5 calling /oauth2/authorize with TokenAccessType.OFFLINE.
Should I check DbxWebAuth .getExpiresAt() and if needed, I should require a new token using the refresh_token as explained here ?
thanks for you help
Greg-DB
Dropbox Community Moderator
5 years agoIf you request "offline" access like that, you'll get a refresh token that can be used to programmatically get a new short-lived access token whenever needed. If you use the constructor my colleague linked to, supplying your refresh token, app key, and app secret (if not using PKCE) in the DbxCredential, the Java SDK will automatically check the expiration and retrieve a new short-lived access token for you, so you that don't need to implement that yourself.
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!