Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
cmpl2022
3 years agoExplorer | Level 3
Dropbox API OAuth 2.0 Access Token
We are currently working on a website (https://ppbranding.com.au/contact) that includes a contact form with a multiple-file upload option. When a user submits this form, we aim to generate a folder i...
Здравко
3 years agoLegendary | Level 20
Hi cmpl2022,
Yes, Dropbox access tokens are short lived and expire in few hours (typically 4 or so). Doesn't matter how they are received! The way to achieve long term access is usage of refresh token (offline access). In such a way you can "refresh" (create new access token programmatically, without further user interaction) whenever needed and go further in your algorithm. If you use some of the SDKs, it's implemented there already - you need just to initialize the Dropbox client object in a proper way and use it... as usual. If you drive your API calls directly, take a look here for details how it can be performed. Just don't forget to implement in your algorithm a check before each regular call if current access token is going to expire (before use it) and if so, to refresh it and use after that. You will need to store refresh token and expiration moment of the current access token in addition (to be able check if it's going to expire). 😉 That's it.
In such a way you don't need your users to drive their own account etc. and all could be done in your account only.
Hope this helps.
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!