cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Download files from dropbox link I received in email using API?

Download files from dropbox link I received in email using API?

dbower
New member | Level 2

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 1

Greg-DB
Dropbox Staff
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.
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?