Telegram Push Notification Configuration Guide

Configuration Principles and API Structure

Telegram message push is implemented based on the Telegram Bot API. The complete push URL is concatenated from the Bot Token (bot access key) and Chat ID (unique recipient identifier).

Standard concatenation template:

[https://api.telegram.org/bot](https://api.telegram.org/bot)<TOKEN>/sendMessage?chat_id=<CHAT_ID>

Steps to Obtain

Step 1: Create a bot and obtain the Bot Token

  1. Open Telegram, enter and follow the official bot @BotFather in the search bar.
  2. Send the command @BotFather: /newbot.
  3. Enter the following information as prompted:
    • Bot Name: the bot's display name (for example: Notification Assistant).
    • Bot Username: the bot's unique username (must end with bot, for example: my_notice_bot).
  4. After creation succeeds, @BotFather will output the API access credential. Copy the HTTP API Token string (in a format such as 123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ).

Step 2: Obtain the recipient Chat ID

Select the corresponding method based on the message recipient type (individual or group):

Option A: Receive notifications as an individual

  • Method 1: Use an official lookup bot (recommended)
    1. Search for and follow @userinfobot in Telegram.
    2. Send it any message or click /start.
    3. The bot will return your personal account metadata. The pure number after Id is your personal Chat ID (for example: 987654321).
  • Method 2: Query through the API endpoint
    1. Proactively send a message to the bot you just created (for example: hello) to activate the conversation.
    2. Open a browser and visit the following link (replace <TOKEN> with the credential obtained in Step 1):
       [https://api.telegram.org/bot](https://api.telegram.org/bot)<TOKEN>/getUpdates
    3. In the returned JSON response, extract the value of "result" -> "message" -> "chat" -> "id".

Option B: Receive notifications in a group/channel

  1. Add the newly created bot to the target Telegram group.
  2. Send any message in the group (for example: test), or grant the bot administrator permissions.
  3. Visit the following link in your browser (replace <TOKEN> with the credential obtained in Step 1):
     [https://api.telegram.org/bot](https://api.telegram.org/bot)<TOKEN>/getUpdates
  4. In the returned JSON response, find the record containing the corresponding group name and extract the "chat" -> "id" field.

    Note: A group's Chat ID is usually a negative number starting with - or -100 (for example: -100123456780). When concatenating, you must preserve the minus sign and prefix in full.


III. URL Concatenation Examples

After obtaining <TOKEN> and <CHAT_ID>, replace them in the standard template:

1. Personal notification URL example

  • Token: 8832838494:AAGb7ReOvyhcbkh03uXMN01nkSNBW9LuL6t
  • Chat ID: 987654321
  • Final concatenated result:
    [https://api.telegram.org/bot8832838494:AAGb7ReOvyhcbkh03uXMN01nkSNBW9LuL6t/sendMessage?chat_id=987654321](https://api.telegram.org/bot8832838494:AAGb7ReOvyhcbkh03uXMN01nkSNBW9LuL6t/sendMessage?chat_id=987654321)

2. Group notification URL example

  • Token: 8832838494:AAGb7ReOvyhcbkh03uXMN01nkSNBW9LuL6t
  • Chat ID: -7
  • Final concatenated result:
    [https://api.telegram.org/bot8832838494:AAGb7ReOvyhcbkh03uXMN01nkSNBW9LuL6t/sendMessage?chat_id=-100123456780](https://api.telegram.org/bot8832838494:AAGb7ReOvyhcbkh03uXMN01nkSNBW9LuL6t/sendMessage?chat_id=-100123456780)