Discuss Dropbox Developer & API
I'm trying to download a large scientific dataset (specifically: [link removed]) which is too large to form a zip file from. Somewhere in the directory hierarchy that becomes possible for each subdirectory, but I really don't want to manually find those points, download the zips, and reconstruct the original hierarchy.
It seems like this should be supported by the python API, and I'm happy (enough) to write code for this, rather than risk making mistakes doing it manually. However although it seems like you can get metadata for the shared link, you can't move from there to any sort of folder object that you can recurse. Similarly it doesn't seem to work to call sharing_mount_folder with the id returned by get_shared_link_metadata.
(Aside: It would be nice if the ids or the documentation for the API contained some namespace information, so that you could directly find out what you can do with a given id.)
Clicking Copy to Dropbox seems to time out, and I presume it wouldn't work anyway, given I don't have sufficient quota to make a copy of the data (Aside: I can't even tell how much quota I would need...)
Is there anything that I'm missing, or is this just an impossible task?
You can use the /2/files/list_folder and /2/files/list_folder/continue endpoints to list the contents of a shared links for folders. That's files_list_folder and files_list_folder_continue in the official Dropbox Python SDK. You can also use the API v2 Explorer to test/prototype these calls.
You would start by setting 'path' to the empty string '' and 'shared_link' to a SharedLink with 'url' set to the shared link. You can also make further calls with 'path' set to the relative path of any subfolder to list that nested folder level.
Note however that there's currently an issue causing such calls to fail if you're not using an access token for the account that owns the shared link. The team is working on resolving that though.
Then you can use /2/sharing/get_shared_link_file (sharing_get_shared_link_file) to download a file at any particular path relative to the linked folder.
Thanks, that's pretty straightforward. Is there a public facing bug tracker that I can watch to determine when the issue is resolved, given that I can't generate an access token for the account that owns the data?
There isn't a separate public bug tracker for this. I'll follow up here once I have an update on that issue.
This should be fixed now. Please let us know if you're still seeing any issues.
Hi there!
If you need more help you can view your support options (expected response time for a 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!