Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
My client has a partnership with a photographer who dumps images in a dropbox folder that is shared. It can be accessed through /sh/... link. For dropbox to work in our solution I need to be able to gather links to and download the images. I found the metadata/link API endpoint but that doesn't give me any possibilities to traverse folders or get urls to actual files? What use is the metadata/link endpoint if it's not possible to download a file using it?
I'm using a sampel app OAuth token to authenticate my requests.
[Edit to offer a simpler solution]
The /metadata/link endpoint allows the app to get additional metadata (path, size, etc.) as well as individual links to files within the folder the link points to. To do so, call /metadata/link with the shared link as the link parameter, as well as the desired sub-path as the path parameter. Then modify and use the returned link to download the contents directly:
https://www.dropbox.com/help/201
(You can use list=true first to get the listing of the folder first.)
Hi Gregory, is the metadata/link endpoint available in the Swift API? I can't seem to find it in the documentation or by looking through the source.
The Swift SDK uses API v2, which doesn't currently have an equivalent of /metadata/link. I believe it is planned, but I don't have a timeline to offer right now.
Dropbox API v2 now offers this via the endpoint /sharing/get_shared_link_metadata:
https://www.dropbox.com/developers/documentation/http/documentation#sharing-get_shared_link_metadata
Thanks Greg!
Gregory, v1 does not have urls to download files. Tried with "public link" url, gives me entries like this:
rualpe-ws:seene-dropbox-experiments paf$ curl -s -d "client_id=$client_id&client_secret=$client_secret&link=https://www.dropbox.com/sh/02pygaow396w775/AAC8ycNc44-87K0To_xeEsLca?dl=0&list=true&path=/Sample Album" -XPOST https://api.dropbox.com/1/metadata/link |jq .
...
{
"rev": "80b8dedbf",
"thumb_exists": true,
"path": "/Sample Album/Pensive Parakeet.jpg",
"is_dir": false,
"client_mtime": "Fri, 09 Nov 2012 14:32:58 +0000",
"icon": "page_white_picture",
"bytes": 480098,
"modified": "Sun, 21 Apr 2013 13:44:16 +0000",
"size": "468.8 KB",
"root": "link",
"mime_type": "image/jpeg"
}
I'm after links to thumbnails and links to file previews.
Alexander, it sounds like you already sorted some of this out, so I'll follow up on the latest thread you replied on, so as not to spam others on these threads.
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!