cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Whether you are transferring a single drive, a team or an entire organization, Movebot's cloud migration tool has been built to make your Dropbox migration simple - learn all about it 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: 

Files/Folder chooser download files

Files/Folder chooser download files

mehulvadodariya
New member | Level 2

Hello 

I had used Dropbox chooser (https://www.dropbox.com/developers/chooser) in my project and it's working correctly. 

As per my project requirement, I want to download files from the chosen directory via API. I can list all the files/subfolders from the chosen directory but I didn't find any way to download any files from the chosen directory and sub-directory using API.

1 Reply 1

Re: Files/Folder chooser download files

Greg-DB
Dropboxer

If you received a shared link for a folder from the Dropbox Chooser, which would look like "https://www.dropbox.com/sh/...", you can then list the contents of that shared link using the Dropbox API, via the /2/files/list_folder[/continue] endpoints. You should supply the shared link as the "shared_link" parameter, and use the empty string "" as the value for the "path" parameter to list the contents of the root of the linked folder. (You can repeat with paths relative to that folder root to get nested folders, if desired.)

From there, once you know the paths of the contents, based on the result of the above call(s), you can then download the file(s).

If you are connected to the same account as the one that owns the shared link, you can use /2/files/download to download files using the paths (i.e., 'path_lower') returned by /2/files/list_folder[/continue].

If you are not connected to the same account as the one that owns the shared link, you can use /2/sharing/get_shared_link_file to download files using paths relative to the root of the linked folder.

Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?