You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
jjsk
8 years agoHelpful | Level 5
Folder download
Per https://www.dropbox.com/help/desktop-web/download-entire-folders I can download any folder through the dropbox web interface. How can I do this via the API?
I'm guessing the web client ...
jjsk
Helpful | Level 5
I think this would be nice resource saving feature. I've seen all kinds of recursive download scripts that basically inundate the dropbox API with requests for each individual file. Seems rather inefficient. Thanks.
deFreitas
8 years agoNew member | Level 2
Here is a workaround, you can create a sharedlink for that folder
curl -X POST https://api.dropboxapi.com/2/sharing/share_folder \ --header "Authorization: Bearer $TK" \ --header "Content-Type: application/json" \ --data '{"path": "/legacy/teste-curl","acl_update_policy": "editors","force_async": true,"member_policy": "anyone"}'
then download it using the preview_url
wget -v https://www.dropbox.com/sh/{shared_link_id}?dl=1
Like this example
wget -v https://www.dropbox.com/sh/j1msw4e8dup2c5q/AAANYUWXcyBDgxVGkveU7AFla?dl=1
After all you can unshare this folder for security reasons
curl -X POST https://api.dropboxapi.com/2/sharing/unshare_folder \ --header "Authorization: Bearer $TK" \ --header "Content-Type: application/json" \ --data "{\"shared_folder_id\": \"1896934208\",\"leave_a_copy\": false}"
- jjsk8 years agoHelpful | Level 5
This is nice thanks. I was also trying to decipher the download call through web client but it got a bit hairy. The zip file comes fromhttps://dl-web.dropbox.com/zip_batch?_subject_uid=<dropbox id>
but I could not figure out in developers tools panel what all the POST parameters were.
- Greg-DB8 years agoDropbox StaffThe zip_batch endpoint isn't part of the public API, so I can't offer information on it or recommend trying to use it, as it is subject to change without warning.
- Greg-DB7 years agoDropbox StaffThe Dropbox API now offers the ability to download folders as zips:
https://www.dropbox.com/developers/documentation/http/documentation#files-download_zip
If you're using an official SDK, there will also be a corresponding method for this endpoint.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 3 days agoIf 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 or Facebook.
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!