Install python-telegram-bot
pip install python-telegram-bot --upgrade
import telegramTELEGRAM_BOT_TOKEN = '880123456:AAGe...'TELEGRAM_CHAT_ID = '-1001306...'PHOTO_PATH = 'img/sample.png'bot = telegram.Bot(token=TELEGRAM_BOT_TOKEN)bot.send_message(chat_id=TELEGRAM_CHAT_ID, text="From Telegram Bot")bot.send_photo(chat_id=TELEGRAM_CHAT_ID, photo=open(PHOTO_PATH, 'rb'))
NOTE: Refer Create Telegram Bot to get TELEGRAM_BOT_TOKEN
and TELEGRAM_CHAT_ID
.