Answer the question
In order to leave comments, you need to log in
How to properly send an image when paying in a Telegram bot?
Hello, there is a task to receive a photo from the user (sent via the telegram client) and in the sendInvoice method, specify the photo that the user sent as the photo_url parameter .
But there is 1 problem, photos that users send to TG have content-type: application/octet-stream (available at https://api.telegram.org/file/bot ACCESS_TOKEN /photos/file_1.jpg), and for the method sendInvoice needs content-type: image/jpeg .
Tell me how best to get out of this situation? I understand that you can save a photo and upload it to your server, which will already give out the correct content-type, but this is a little expensive, maybe there are some other ways?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question