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
psehrawat
8 years agoNew member | Level 2
How to download files from a publicly shared folder?
We developed an app using an endpoint from v1 /1/metadat/link (to list all from a shared link). I couldn't find any endpoint from v2 having same functionality. My app has a simple a functionality...
Greg-DB
8 years agoDropbox Staff
I don't currently have a solution to offer for this on API v2 unfortunately. I just replied to your ticket though and granted your app an extension. Please check the reply there for details.
- Greg-DB8 years agoDropbox StaffFor reference, Dropbox API v2 now supports listing the contents of a shared link for a folder. This can be accomplished using the same interface as listing a folder in a connected user's account, via the list_folder functionality. To list the contents of a shared link for a folder, you instead provide the shared link URL in the `shared_link` parameter to list_folder:
https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder
If you're using an official SDK, there will also be a corresponding method for this endpoint:
In the .NET SDK that's available as `ListFolderAsync`:
https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Files_Routes_FilesUserRoutes_ListFolderAsync_1.htm
In the Java SDK that's available via `listFolderBuilder` to get a `ListFolderBuilder` on which you can call `ListFolderBuilder.withSharedLink`:
https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.0.x/com/dropbox/core/v2/files/DbxUserFilesRequests.html#listFolderBuilder-java.lang.String-
https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.0.x/com/dropbox/core/v2/files/ListFolderBuilder.html
https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.0.x/com/dropbox/core/v2/files/ListFolderBuilder.html#withSharedLink-com.dropbox.core.v2.files.SharedLink-
In the JavaScript SDK that's available as `filesListFolder`:
https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesListFolder__anchor
In the Python SDK that's available as `files_list_folder`:
https://dropbox-sdk-python.readthedocs.io/en/latest/moduledoc.html#dropbox.dropbox.Dropbox.files_list_folder
In the Swift SDK that's available as `listFolder`:
https://dropbox.github.io/SwiftyDropbox/api-docs/latest/Classes/FilesRoutes.html#/s:13SwiftyDropbox11FilesRoutesC10listFolderAA10RpcRequestCyAA0C0C04ListF16ResultSerializerCAH0if5ErrorK0CGSS4path_Sb9recursiveSb16includeMediaInfoSb0O7DeletedSb0O24HasExplicitSharedMembersSb0O14MountedFolderss6UInt32VSg5limittF
In the Objective-C SDK that's available as `listFolder`:
https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBFILESUserAuthRoutes.html#/c:objc(cs)DBFILESUserAuthRoutes(im)listFolder:- elsigh7 years agoHelpful | Level 5
I'm having the same issue. I have a shared_link to a folder and I'd like to enumerate each file in that folder and be able to download each one independently.
I'm using the Javascript version of the SDK.
So I'm calling
filesListFolder({url: "", shared_link: {url: myURL}}
and that returns a list of file metadata but I cannot figure out a way to go from that response and the data in each file's metadata to something I can use with the filesDownload (id seems surprisingly not-useful for non-mounted content) or any of the sharing download functions (which all require an URL for each file which is not something in the response).
How can I do this?
- Greg-DB7 years agoDropbox Staff
To download a file from a shared link for a folder using the JavaScript SDK, use the sharingGetSharedLinkFile method. You should supply the original shared link, i.e., the same URL you passed to filesListFolder, as well as the relative path for the particular file in the folder you want to download.
- RichardTSchaefe7 years agoNew member | Level 2
I am using a WEB API for manipulating user files when I am acting on behalf of a dropbox user.
However I can have a user that does not have a dropbox account that is presented with the shareded folder link.
If I want to use the shared_link in the files/list_folder request so I can traverse this shared folder.
Can do so without an authentication token ?
As I indicated I have a use case where I do not have a dropbox account, but I have been granted the shared_link ... so the user does have access to the content.
If the shared_link had a password ... what would the JSON payload need to contain to access the folder ?
- Greg-DB7 years agoDropbox Staff
RichardTSchaefe The list_folder endpoint unfortunately doesn't support "app authentication" (i.e., so no user access token is required), only "user authentication" (where a user access token is required), so I'm afraid I don't have a good solution for this use case. I'm sending this along as a feature request.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,918 PostsLatest Activity: 2 days ago
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 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!