Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hi, I am using the API v2 and trying to retrieve the thumbnail URL of PDF files so I can use them inside <img> tags of my HTML code.
Currently I use this endpoint and headers:
POST https://content.dropboxapi.com/2/files/get_thumbnail
Authorization: Bearer <access token> Dropbox-API-Arg: {"path": "/<path to file>.pdf", "format": "jpeg", "size": "w64h64", "mode": "strict"}
and as a response I get the binary data of the file itself, so in my use case I have to download it, store it and then provide it in my HTML code as an image link, which is not optimal and I would like to avoid.
I wonder if there is any other endpoint or option that can give me back a Dropbox API hosted URL of the thumbnail instead of the file itself.
Thank you,
Vassilis
PS: The documentation page at https://www.dropbox.com/developers/documentation/http/documentation#files-get_thumbnail is kind of outdated as it looks like it refers to a previous API version which was returning a JSON object.
But your Chooser does show PDF thumbnails. So is that you're using a private API for your own file chooser, but third party devs can't access the same API for their own file pickers?
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!