I’m trying to send a message to telegram using Telegram API bot.
I want to make a GET request, that will send both text and image to my telegram channel.
Now fetch looks like that:
telegram_msg = requests.get('https://api.telegram.org/<botname>:botAPI/sendMessage?chat_id=<chat_id>=some text')
How can I include an image that is located here and send both text and image in one message?
Thank you for your help.
UPD: I can send image using sendPhoto, but how can I combine these two requests into one? So that I can send both image and text?
2
Answers
use caption parameter in sendPhoto method
After using @BotFather to get your API token
Post result with text and image in Telegram