Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
@nadeemphpdots wrote:...
Is there any api to get both thumbnail and actual image?
No, both - no. You already know how to display your thumbnail. For actual image, you can select using shared link, temporary link, or image data (like the thumbnail). Shared link can be created with 2/sharing/create_shared_link_with_settings, temporary link with 2/files/get_temporary_link, and actual image data with 2/files/download.
First 2 give URL, the last one - data! Don't mix them again. ![]()
The choice is yours.
ADD: Actually there is alternative non supported way to get links URL to contained pictures in such a shared folder link. The work of such a hacking way is not guaranteed. Executing something like:
curl https://www.dropbox.com/sh/ns2y8e6lqyh5avz/AAAHX5tPck8CHwpcSKMwV7cba?dl=0 -H "User-Agent: Mozilla" | xmllint --html --xpath "/html/body/script[last()-1]" - | tr '\n' '\f' | sed 's/.*<script type="text\/javascript".*<!\[CDATA\[.*responseReceived("\(.*\)")});.*\]\]><\/script>.*/\1/' | tr '\f' '\n' | sed 's/\\"/"/g' | sed 's/\\\\/\\/g' | jq... will give you all available data for this shared link. You can filter further this information to get desired data. For example, you can get for every single photo on the shared link its thumbnail and full size picture link/URL using following:
curl https://www.dropbox.com/sh/ns2y8e6lqyh5avz/AAAHX5tPck8CHwpcSKMwV7cba?dl=0 -H "User-Agent: Mozilla" | xmllint --html --xpath "/html/body/script[last()-1]" - | tr '\n' '\f' | sed 's/.*<script type="text\/javascript".*<!\[CDATA\[.*responseReceived("\(.*\)")});.*\]\]><\/script>.*/\1/' | tr '\f' '\n' | sed 's/\\"/"/g' | sed 's/\\\\/\\/g' | jq '.entries[] | .thumbnail_url_tmpl, .preview.content.full_size_src'I believe you can "translate" the algorithm above to PHP. 🤫![]()
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!