cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Musicians, convert your MuseScore files to PDF to play music on the go! Learn more 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: 

List / download from other users' public folders in iOS?

List / download from other users' public folders in iOS?

Kevin S.44
New member | Level 1

Is it possible for Dropbox users to list a folder as public, and for an iOS app to (after getting the link to the folder) list the contents of the folder and download the contents?

My goal is read-only sharing of files between users, and I was hoping Dropbox could be a solution.

4 Replies 4

Greg-DB
Dropbox Staff

Dropbox API v2 does have endpoints for getting shared link metadata and files, but unfortunately they don't currently offer the file listing for links that point to folders. So, if you knew the names of the files you want to download in the folder, that would work, but you can't list the names using that.

The v1 version of the endpoint does offer that though:

https://www.dropbox.com/developers-v1/core/docs#metadata-link

Kevin S.44
New member | Level 1

Is the v1 version still useable with the current API?

Greg-DB
Dropbox Staff

API v1 is the older version of the Dropbox API. API v2 is recommended, but API v1 is still usable.

For reference, the iOS Core SDK uses API v1, and SwiftyDropbox uses API v2. The iOS Core SDK unfortunately doesn't implement the API v1 /metadata/link endpoint, but you can implement it separately if you want.

Greg-DB
Dropbox Staff
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_ListFol...


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/DbxUserFilesReq...

https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.0.x/com/dropbox/core/v2/files/ListFolderBuild...

https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.0.x/com/dropbox/core/v2/files/ListFolderBuild...


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_lis...


In the Swift SDK that's available as `listFolder`:

https://dropbox.github.io/SwiftyDropbox/api-docs/latest/Classes/FilesRoutes.html#/s:13SwiftyDropbox1...


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:ob...:
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Kevin S.44 New member | Level 1
What do Dropbox user levels mean?