Let’s start
In this Tutorial we will learn about how to make a Telegram Bot and send message using Telegram Bot API from beginning.
Later on we will also cover other advance topics such as making downloading bots,auto message sender and other bots so stay tuned for our blog updates.
For sending message through Telegram Bot API we first need to create a Telegram Bot
How to make a Telegram Bot
For making a telegram bot you need to start a conversation with @Botfather which an official Telegram Bot that can make other bots.
- Start a conversation with Bot father by sending a “/start” message.
- Then you will see the startup dialog with all the commands used to control the Botfather.
- Make a new telegram bot using the command “/newbot”.
- After writing the /newbot command bot father will ask you to give your bot a new name send a name to botfather.
- Then after giving a name botfather will ask you to assign a new username for your telegram bot make sure the username you are choosing is completely unique.
If everything is successful and done in a right way you will get a message with you bot token API on it. like this given below.
How to send message through Telegram Bot API
Now lets start to send message through telegram bot API
Telegram bot can’t find all the users who all have subscribed to your bot. So people generally saved the userid of the person who visits our bot and starts it. These userid’s are then collected and can be used to broadcast message make others useful telegram bots.
There are many ways to get the user id like using some other telegram bot that can do it by forwarding any message like userinfobot(To get your own userid), get_id_bot(To get user id of any person by forwaring any message),GetChannelIdPlus_bot(To get channel Id by forwarding a message from any channel).
There are also few 3rd party apps which give access to all this but we will use the original and most easy way that is login via Telegram web.
Now lets get started and send our first message through Telegram Bot API follow the following step :-
- Add your bot to the group you want to send message. Here i will make my own group for testing i added the bot which i created to that group.
Now after adding the bot we need to send the group chat id you can use the above mention bot for that or the chat id is mentioned directly on the telegram web url when you open the group. Make sure to add “-” in front of your chatid if you are sending message to a group and if you are sending it to a user write the chat id directly without “-“.
- After getting the Chatid the last work is to send a message using API for that you need to send a API request which you can simply perform by pasting the request in the web browsers URL.
https://api.telegram.org/bot$Your_TelegramBot_Token_Here/sendMessage?chat_id_Here=$chat&text=Enter_Your_Message_Here
19 Comments
Pingback: Top 3 Free AI Tool Of 2023 – YOU MUST KNOW » MyReviewBites
Pingback: Read Aloud - A Linux Based Ebook And Document Reader
Pingback: » MyReviewBites
Pingback: Why Does Telegram Load Media Slowly » MyReviewBites
Pingback: » MyReviewBites
Reading your article has greatly helped me, and I agree with you. But I still have some questions. Can you help me? I will pay attention to your answer. thank you.
Thanks for sharing. I read many of your blog posts, cool, your blog is very good.
I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article. https://accounts.binance.com/ru/register?ref=PORL8W0Z
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me. https://accounts.binance.com/bg/register-person?ref=PORL8W0Z
After reading your article, it reminded me of some things about gate io that I studied before. The content is similar to yours, but your thinking is very special, which gave me a different idea. Thank you. But I still have some questions I want to ask you, I will always pay attention. Thanks.
After reading your article, it reminded me of some things about gate io that I studied before. The content is similar to yours, but your thinking is very special, which gave me a different idea. Thank you. But I still have some questions I want to ask you, I will always pay attention. Thanks.
Your article made me suddenly realize that I am writing a thesis on gate.io. After reading your article, I have a different way of thinking, thank you. However, I still have some doubts, can you help me? Thanks.
Your article made me suddenly realize that I am writing a thesis on gate.io. After reading your article, I have a different way of thinking, thank you. However, I still have some doubts, can you help me? Thanks.
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me. https://accounts.binance.com/bg/register?ref=IJFGOAID
Your enticle helped me a lot, is there any more related content? Thanks! https://accounts.binance.com/en/register?ref=P9L9FQKY
I may need your help. I’ve been doing research on gate io recently, and I’ve tried a lot of different things. Later, I read your article, and I think your way of writing has given me some innovative ideas, thank you very much.
I may need your help. I’ve been doing research on gate io recently, and I’ve tried a lot of different things. Later, I read your article, and I think your way of writing has given me some innovative ideas, thank you very much.
Your enticle helped me a lot, is there any more related content? Thanks! https://accounts.binance.com/en/register-person?ref=53551167
Pingback: 4 ways to Convert Scanned PDF To Word Free Software Download - MyReviewBites