cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and 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: 

How do I download a file from a shared folder with the API?

How do I download a file from a shared folder with the API?

yodirkx
New member | Level 2

The workflow:

 

- I have a Chooser to single select a folder, not a file, not multiple files

- I send the share URL for the folder to my back-end, to create a file browser

- The user selects several files within the shared folder somewhere

- I download the selected files first, and then ALL other files in the folder

 

Chooser works. The file browser works (with `files/list_folder` and `shared_link`). Downloading any files does NOT work.

 

If I do a `sharing/get_shared_link_metadata`, I get a `shared_link_access_denied`.

If I do a `sharing/get_shared_link_file`, I get a `shared_link_access_denied`.

I don't see direct download links in `files/list_folder`, so I need another API call using the file's `path` or `id`.

I don't think I can download shared files with `files/download`, because I can't enter a `shared_link` there, so I need a share API call.

 

Opening the shared folder link in the browser works. Downloading files from there works. Just not with the API.

 

How do I download shared files (or rather: files from a shared folder) with the API?? This is ridiculous. Am I super dumb, or is this super hard?

1 Reply 1

Greg-DB
Dropbox Staff

Using sharing/get_shared_link_file, with the 'url' and 'path' parameters, is the right way to get the file data for a file in a folder when you have the shared link for the folder. (And likewise, sharing/get_shared_link_metadata for the file metadata.)

Are you using an app registered for the "app folder" permission to make these calls though? That won't work unfortunately. I'm sending this along to the team to see if we can make that work in the future, but I can't offer a timeline for that.

Instead, use an app registered for the "full Dropbox" permission to make these calls and they should work. You can register one here if you don't already have one.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?