Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
dbower
7 years agoNew member | Level 2
Download files from dropbox link I received in email using API?
We recive 100's of emails containing a dropbox share link in the email body. We have written an applicatoin to open the email and extract the Dropbox link. Is there any way to use the Dropbox API to automate the process of downloading the documents from the link to our own dropbox account? Could we download them to a hard drive and then re-upload them to Dropbox?
We really do not want to write a web scraping app to download all these files!
1 Reply
- Greg-DB7 years ago
Dropbox Community Moderator
To download a file from a Dropbox shared link directly to your own Dropbox account, you can use the /2/files/save_url endpoint:
https://www.dropbox.com/developers/documentation/http/documentation#files-save_url
Note that this only works if the shared link is for a file, not a whole folder. If you need to download specific files from a shared link for a folder (or the whole folder), you'll need to do so individually using /2/sharing/get_shared_link_file:
https://www.dropbox.com/developers/documentation/http/documentation#sharing-get_shared_link_file
Or by downloading the whole folder as documented here:
https://www.dropbox.com/help/desktop-web/force-download
You can then upload to your own account as desired, e.g., using /2/files/upload:
https://www.dropbox.com/developers/documentation/http/documentation#files-upload
Those are links to the documentation for the HTTPS endpoints themselves, but we recommend using one of the official SDKs if possible:
https://www.dropbox.com/developers/documentation
Those have corresponding native methods for the HTTPS endpoints.
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!