Skip to main content

Telegram Set-up

Steps to set-up telegram updates.

How to create telegram bot.

  1. Start a new conversation with the BotFather.

  2. Send /newbot to create a new Telegram bot.

  3. When asked, enter a name for the bot.

  4. Give the Telegram bot a unique username. Note that the bot name must end with the word "bot" (case-insensitive).

  5. 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.

  1. Go to the telegram bot you recently created.
  2. Send /start command.
  3. Go to https://api.telegram.org/bot{our_bot_token}/getUpdates.
  4. 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"
}
}
]
}
  1. 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.

  1. Create a new group or open the existing telegram group
  2. Add your bot the group.
  3. Send /start command to the group.
  4. Go to https://api.telegram.org/bot{our_bot_token}/getUpdates.
  5. 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"
}
}
}
  1. Use the id of the chat object as the group chat id.