cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you interested in hearing how one of our Community members uses Dropbox for sailing trips? Read 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: 

Re: Cannot obtain download links for files in public shared folder

Cannot obtain download links for files in public shared folder

LarisaMoroz
New member | Level 2
Go to solution

Hello.

I have a link to a shared folder with thousands of photos:
https://www.dropbox.com/sh/saudciiyp40kjr5/AACG9UCNAtsy0WMxuX82xGLma?dl=0

I can see and download any of them from browser without authentication, even as guest.

I need to provide download links for some of them to other application.

In my app, which has "Full Dropbox" permission type, 
I'm able to use files/list_folder API call to get list of files in the folder (I use  shared_link => url parameter instead of path ).

But the list doesn't contain download links for photos.
Path information also does not provided.

When I'm trying to use shared/get_file_metadata API call with any files id ( id:iTdyj36XZGAAAAAAAACN0A for example) I recieve error :

{ 
"error_summary": "access_error/invalid_file/...", 
"error": { ".tag": "access_error", "access_error": { ".tag": "invalid_file" } } 
}

On files/get_metadata   I receive error: 

{ 
"error_summary": "path/not_found/.", 
"error": { ".tag": "path", "path": { ".tag": "not_found"} }
 }



So, how I can obtain these download links for photos in the shared folder?

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

I'm afraid that's correct; there unfortunately isn't a way to do exactly what you want to do here. While you can retrieve the metadata and file content for a particular file from a shared link for a folder like this using /2/sharing/get_shared_link_file as mentioned, the Dropbox API doesn't offer a way to retrieve the download link. I'll pass this along as a feature request, but I can't promise if or when that might be implemented. 

View solution in original post

7 Replies 7

Здравко
Legendary | Level 20
Go to solution

LarisaMoroz
New member | Level 2
Go to solution

I don't see direct download link or path to a file n the result of call sharing/get_shared_link_file   like I see at webpage of shared folder.

There are just meta-information and again, url to the shared folder.
I don't need to download each photo, but only provide links to download some of them to other web-application.

When I click on any photo in the page: https://www.dropbox.com/sh/saudciiyp40kjr5/AACG9UCNAtsy0WMxuX82xGLma?dl=0 — I see that path in address bar changed, for example, to https://www.dropbox.com/sh/saudciiyp40kjr5/AACQtgXfdbKhNXwLG7Ki7xqya/391111_04.jpg?dl=1 and then I can just replace dl=0 to dl=1 and provide this url next.


But when I use API, how can I obtain this part of file's url: saudciiyp40kjr5/AACQtgXfdbKhNXwLG7Ki7xqya  to make downloadable link from it?

 

Здравко
Legendary | Level 20
Go to solution

Seems the feature you ask for is unavailable (or deprecated for some reason -don't ask me why). Possible workaround is using https://www.dropbox.com/developers/documentation/http/documentation#sharing-create_shared_link_with_... for every one file.

LarisaMoroz
New member | Level 2
Go to solution

Thank you.
But sharing/create_shared_link_with_settings requires path parameter, which I don't have.
The shared folder is not mine. I have only url

Здравко
Legendary | Level 20
Go to solution

Ohh... I misunderstood. In such a case, I don't know any useful move. @Greg-DB might provide some workaround or, at least, accepts the above as a feature request.

Good luck.

Greg-DB
Dropbox Staff
Go to solution

I'm afraid that's correct; there unfortunately isn't a way to do exactly what you want to do here. While you can retrieve the metadata and file content for a particular file from a shared link for a folder like this using /2/sharing/get_shared_link_file as mentioned, the Dropbox API doesn't offer a way to retrieve the download link. I'll pass this along as a feature request, but I can't promise if or when that might be implemented. 

Greg-DB
Dropbox Staff
Go to solution

Update: The Dropbox API now returns the shared link for the nested item as 'url' when requesting the metadata for that item using the "path" parameter on /2/sharing/get_shared_link_metadata (instead of the original parent link).

Need more support?