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: 

Re: How to list a shared directory via Dropbox API?

How to list a shared directory via Dropbox API?

rustyx2
Helpful | Level 5

I am writing an app that needs to download all the files from a directory shared via a link.

But when a link is a folder, /2/sharing/get_shared_link_file returns:

HTTP/409 shared_link_is_directory/..



So then I invoke /2/sharing/get_shared_link_metadata, I get:

{
  ".tag": "folder",
  . . .
}



There is just an indication of a folder, but no way to see the contents of it.

However, when I access the same URL via a browser, I do see the contents and I am able to download the files without "mounting" the shared folder into my Dropbox.

So it appears to be possible via a Browser, but not via the API.

Is there a list_shared_folder API or something like it?

 

11 Replies 11

Greg-DB
Dropbox Staff

API v2 doesn't return the file/folder listing for shared links, e.g., in SharedLinkMetadata/FolderLinkMetadata, unfortunately. I'll send this along as a feature request though.

 

(A workaround would be to use the deprecated /1/metadata/link.)

rustyx2
Helpful | Level 5

Indeed, using API v1 I was able to get the file list. Thanks a lot for the tip!

 

I only hope that API v2 will support this before v1 is disabled 😮

tim
Explorer | Level 4

Hi Greg

I am unable to migrate my app (Grab for Dropbox) to API v2 because of this issue.

Please update us when you can deliver this for API v2 -- being able to list contents of a shared folder is a basic requirement, i'm surprised this is still missing from API v2. How are shared links supposed to be useful if you can't use the API to recurse the file structure?

thanks

 

Greg-DB
Dropbox Staff
Thanks for the feedback Tim! I'll add your feedback to the feature request, and be sure to update this thread with any information if/when I have it.

xaphod
Explorer | Level 4

Hi Greg

Please unmark this as solved. It's not solved until this works on a version of the API that isn't about to be switched off.

Is this working in v2 yet? My apps depend on it

Greg-DB
Dropbox Staff

This isn't available in API v2, and I don't have an update on this unfortunately.

 

(Also, Rustam opened this thread and marked the post as a solution, so I believe he can unmark it if he wants to.)

rustyx2
Helpful | Level 5
OK I've unmarked it as solved, was hoping that API v2 would support this functionality by now.

It seems like we have only a couple of months left before v1 is switched off, don't we?

Any idea if this is even on the radar of the dev team?

It would be a real shame if we have to resort to scraping.

Stephen C.14
Dropbox Staff

This is absolutely on our radar, and we are trying to prioritize it in light of the API v1 deprecation timeline. Will update the thread again when we make this fix.

dougnorton
New member | Level 2

v1 is gone what would be the replacement for 

https://api.dropbox.com/1/metadata/link
Need more support?