Hi,
I am getting the following error for this type of pic:
Invalid Content-Type [application/octet-stream] for specified URL
pics:
https://api.telegram.org/file/bot195454852:AAET4-p8zMuFUrCJth_9NwDX0jo0qRfajZc/photo/file_167.jpg
I am using the api for more than 2 weeks and it worked with the same data type previously.
My service is broken, although I’ve bought a premium plan!
Join in the discussion - add comment below:
Hi there,
there have been no changes to the API implementation: what I’m seeing as of today is that Telegram’s file download API is now returning application/octet-stream instead of image/jpeg as the content type for the image being downloaded. As a result the textibility API doesn’t know how to interpret the file and returns that error.
To work around this issue you can provide the expected content type as a parameter: doing this in curl would look like this
curl -v https://ideasynthesis-textibility.p.mashape.com/barcode/decode -H “X-Mashape-Authorization: {MASHAPE KEY}” -d “url=https://api.telegram.org/file/bot195454852:AAET4-p8zMuFUrCJth_9NwDX0jo0qRfajZc/photo/file_167.jpg” -d “content-type=image/jpg”
Simply replace {MASHAPE KEY} with your actual Mashape API key and your API calls should work once again.
Take care, and thanks.