This tutorial is for those who want to develop a Telegram bot for the first time. We will use requests
library to send HTTP requests to Telegram Bot API. We will also use json
library to parse the response from Telegram Bot API.
- Python 3.6 or above
requests
libraryjson
library
- Open Telegram app and search for
@BotFather
. - Send
/newbot
command to@BotFather
. - Follow the instructions to create a new bot.
- Copy the token of the bot.
- URL:
https://api.telegram.org/bot<token>/getMe