Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
nadeemphpdots
4 years agoExplorer | Level 4
Get thumbnails of files from shared folders
Hi there,
I get list of files inside shared folder using "2/files/list_folder" with "shared_link" parameter and I am using response from "2/files/list_folder" into "2/files/get_thumbnail_v2"...
Greg-DB
Dropbox Community Moderator
4 years agoYou should be able to use /2/files/get_thumbnail_v2 to get a thumbnail of a file from a shared link for a folder. I just tried it out and it worked for me. Here's an example of what the call might look like for curl, for instance:
curl -X POST https://content.dropboxapi.com/2/files/get_thumbnail_v2 \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Dropbox-API-Arg: {"resource":{".tag":"link","path":"/test.jpg","url":"<SHARED_LINK>"}}' \
-o out.jpg
In this example, "/test.jpg" is the relative path of the file for which I want the thumbnail in the linked folder.
If something's not working as expected for you, please show us the steps and code you're using that result in the issue so we can take a look. Make sure to redact any access token though.
Здравко
4 years agoLegendary | Level 20
nadeemphpdots, In addition to what Greg said, you can use those calls also with Application Authentication. In other words, you don't need to be logged in since shared resource isn't something private (by assumption).
Greg-DB, I thought to post the example in App Authentication section, but there is a mistake. Can you use path in anonymous access, alone?! 😉 Maybe some documentation corrections are need.
- Greg-DB4 years ago
Dropbox Community Moderator
Yes, this works with app authentication as well. In that case it would look like:
curl -X POST https://content.dropboxapi.com/2/files/get_thumbnail_v2 \ --header "Authorization: Basic <ENCODED_APP_KEY_AND_SECRET>" \ --header 'Dropbox-API-Arg: {"resource":{".tag":"link","path":"/test.jpg","url":"<SHARED_LINK>"}}' \ -o out.jpg
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
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!