We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
MLPDev
2 years agoNew member | Level 2
File upload
Hi guys.
I'm creating a React app. I'm planning to save files uploaded by the user in my Dropbox. Is it possible through the API?
By the way, I tried using an access token generated from the Dropbox site, and it is working fine. However, after a couple of hours, the token expires, so I need to generate it again and update the code. Is there any solution using any of the Dropbox API?
1 Reply
- Greg-DB2 years ago
Dropbox Community Moderator
Dropbox does offer an API you can use for listing, uploading, and downloading files, among other operations. You can find everything you need to get started with the Dropbox API, including documentation, tutorials, and SDKs here.
Dropbox issues short-lived access tokens, which expire after a few hours. Apps can get long-term access by requesting "offline" access though, in which case the app receives a "refresh token" that can be used to retrieve new short-lived access tokens as needed, without further manual user intervention. Refresh tokens do not expire automatically and can be used repeatedly. You can find more information in the OAuth Guide and authorization documentation. There's a basic outline of processing this flow in this blog post which may serve as a useful example.
About Discuss Dropbox Developer & API
Make connections with 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!