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.
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.
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.
In the Telegram app, search for @BotFather (official bot with a verified badge). Open the chat.
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).
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.
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.
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).
Log in to SurePing. In the left sidebar, click Alert Contacts.
Click Add Contact. Enter a Friendly Name (e.g. "Gary Telegram"). Open the Contact Method dropdown and select Telegram.
In the credential field, paste your token and chat ID separated by a colon: botToken:chatId. Example: 7123456789:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw:123456789. No spaces.
Click Add Contact. The contact appears in your list.
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.
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.
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.