Telegram Set-up
Steps to set-up telegram updates.
How to create telegram bot.
-
Start a new conversation with the BotFather.
-
Send /newbot to create a new Telegram bot.
-
When asked, enter a name for the bot.
-
Give the Telegram bot a unique username. Note that the bot name must end with the word "bot" (case-insensitive).
-
Copy and save the Telegram bot's access token for later steps.
How to find your Chat ID ?
Use the below steps if you want telegram updates on your personal account.
- Go to the telegram bot you recently created.
- Send
/start
command. - Go to https://api.telegram.org/bot{our_bot_token}/getUpdates.
- You'll see json like this,
{
"ok": true,
"result": [
{
"update_id": 83xxxxx35,
"message": {
"message_id": 2643,
"from": {...},
"chat": {
"id": 21xxxxx38,
"first_name": "...",
"last_name": "...",
"username": "@username",
"type": "private"
},
"date": 1703062972,
"text": "/start"
}
}
]
}
- Check the value of
result.0.message.chat.id
, and here is our Chat ID:21xxxxx38
How to find your Group chat ID ?
Use the below steps if you want telegram updates on your group.
- Create a new group or open the existing telegram group
- Add your bot the group.
- Send
/start
command to the group. - Go to https://api.telegram.org/bot{our_bot_token}/getUpdates.
- You'll see json like this,
{
"update_id": 8393,
"message": {
"message_id": 3,
"from": {
"id": 7474,
"first_name": "AAA"
},
"chat": {
"id": <group_ID>,
"title": "<Group name>"
},
"date": 25497,
"new_chat_participant": {
"id": 71,
"first_name": "NAME",
"username": "YOUR_BOT_NAME"
}
}
}
- Use the
id
of thechat
object as the group chat id.