Telegram Alerts — Bot Setup Guide

Get monitor alerts in Telegram in under ten minutes.

Complete step-by-step guide: create a Telegram bot with BotFather, get your chat ID, and add credentials in SurePing.

What you need

A Telegram account (mobile or desktop). A Telegram bot token from @BotFather. Your Telegram chat ID (a numeric ID for you or a group). In SurePing, credentials are stored as botToken:chatId — the bot token itself contains a colon, so SurePing uses the last segment as the chat ID and everything before it as the token.

Example format: 123456789:ABCdefGHIjkLMNopqrsTUVwxyz:987654321 where 987654321 is the chat ID.

Create your Telegram bot

  1. Open Telegram and find BotFather

    In the Telegram app, search for @BotFather (official bot with a verified badge). Open the chat.

  2. Start a new bot

    Send the command /newbot. BotFather asks for a display name (e.g. "My Uptime Alerts") and a username ending in bot (e.g. mysite_uptime_bot).

  3. Copy the bot token

    BotFather replies with a message containing your token. It looks like 7123456789:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw. Copy the entire string and store it securely — anyone with this token can control your bot.

  4. Message your bot

    Search for your new bot by its username and open the chat. Send any message (e.g. "Hello"). This is required so Telegram allows the bot to message you.

  5. Get your chat ID

    Option A: Message @userinfobot on Telegram — it replies with your numeric Id. Option B: Visit https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates in a browser (replace with your token). Find "chat":{"id":...} in the JSON — that number is your chat ID. For group chats, add the bot to the group, send a message in the group, then check getUpdates for the group chat ID (often negative).

  6. Open Alert Contacts in SurePing

    Log in to SurePing. In the left sidebar, click Alert Contacts.

  7. Add a new contact

    Click Add Contact. Enter a Friendly Name (e.g. "Gary Telegram"). Open the Contact Method dropdown and select Telegram.

  8. Enter Bot Token : Chat ID

    In the credential field, paste your token and chat ID separated by a colon: botToken:chatId. Example: 7123456789:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw:123456789. No spaces.

  9. Save the contact

    Click Add Contact. The contact appears in your list.

  10. Send a test notification

    Click the test/send icon on the contact row. You should receive a test message in Telegram within a few seconds. If not, see troubleshooting below.

  11. Assign to monitors

    When creating or editing a monitor, select this Telegram contact under alert contacts. You will receive Telegram messages when that monitor goes down or recovers.

Troubleshooting

Unauthorized or chat not found — You did not message the bot first, or the chat ID is wrong. Message the bot and re-check getUpdates.

Invalid format — Ensure you used botToken:chatId with the chat ID as the final segment after the last colon.

Bot token leaked — Revoke the token in BotFather with /revoke and create a new bot or token, then update the contact in SurePing.

Group chats — Add the bot to the group, disable privacy mode in BotFather (/setprivacy → Disable) if the bot must read all messages, then use the group chat ID from getUpdates.

Related help