Dropbox /previews not working

1.2k Views Asked by At

I'm trying to get the file preview using:

curl "https://api-content.dropbox.com/1/previews/auto/Get Started with Dropbox.pdf" -H "Authorization: Bearer <ACCESS-TOKEN>"

But it always return:

{"error": "no_preview.file_content."}

Please advise if there is anything wrong with my approach.


Update

Trying with /files (GET):

curl "https://api-content.dropbox.com/1/files/auto/Get Started with Dropbox.pdf" -H "Authorization: Bearer <ACCESS-TOKEN"

And it return the content (download the file).

1

There are 1 best solutions below

4
On BEST ANSWER

From https://www.dropbox.com/developers/core/docs#previews:

Previews are only generated for the files with the following extensions: .doc, .docx, .docm, .ppt, .pps, .ppsx, .ppsm, .pptx, .pptm, .xls, .xlsx, .xlsm, .rtf

PDF isn't on the list.