
Now you will need to set the webhook for the telegram bot. You will see the response “Welcome!” same as the previous step. Go to the Ngrok and type the command “ngrok http 5000” after running this command you will get the links.įrom that Ngrok links copy the HTTPS link and paste it to your browser. When you run the code you will get the link for the server like “ ” click on that link you will be redirected to the webpage where you will see the response “Welcome!”

Run this code to check whether the flask app is running correctly or not. $ pip install Flask from flask import Flask Step 7: Creating a flask app for the webhook response.įirst of all, you will need to install python and flask on your computer. Keep your token secure and store it safely. it contains a token to access the HTTP API. Step 6: After giving a unique username you will get a message like the below. Step 5: Now type a unique username for your bot. Step 2: Click on the “BotFather” and Click on the “Start” button. Step 1: Open your telegram account and in the search bar type “BotFather”.

Here we learn how we can get different types of responses from the bot such as:įollow the below instructions to make a Telegram chatbot. In this tutorial, we will learn about how we can create a Telegram chatbot and use it to prepare text messages with rich responses. On platforms such as Facebook, Google, and others, we can develop chatbots. For engaging conversations, the automated chatbot is really beneficial.
