Connect PingBase to Telegram
Get downtime alerts as Telegram messages via a bot
What you'll get
A PingBase bot sends you a Telegram message the moment a monitor goes down, and another when it recovers. Works in direct messages or group chats.
Step 1 — Create a Telegram bot
-
1
Open Telegram and search for @BotFather. Start a chat and send the command
/newbot. -
2
Follow the prompts: choose a display name (e.g. "PingBase Alerts") and a unique bot username ending in
_bot(e.g.my_pingbase_bot). -
3
BotFather will reply with a bot token like:
1234567890:AAFxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Copy this token — you'll need it in Step 3.
Step 2 — Get your chat ID
PingBase needs your Telegram chat ID to know where to send messages.
-
1
Start a chat with your new bot by searching for its username and clicking Start. (For group alerts, add the bot to your group and send it a message.)
-
2
Call the Telegram API to get your chat ID — replace
YOUR_TOKENwith the token from Step 1:
curl https://api.telegram.org/botYOUR_TOKEN/getUpdates -
3
In the JSON response, find
result[0].message.chat.id. That number is your chat ID (it may be negative for groups, e.g.-1001234567890).
Step 3 — Add the Telegram channel to PingBase
Via dashboard
- 1. Go to Settings → Alert Channels in your PingBase dashboard.
- 2. Click Add channel, choose Telegram.
- 3. Enter your bot token and chat ID, give the channel a name, and click Save.
Via API
curl -X POST https://pingbase-worker.workers.dev/api/alert-channels \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "telegram",
"name": "Ops Alerts",
"bot_token": "1234567890:AAFxxxxxxxxxx",
"chat_id": "-1001234567890"
}'
Troubleshooting
No messages arriving
Make sure you started a conversation with the bot first — Telegram bots can't initiate chats. For groups, ensure the bot was added as a member and has permission to send messages.
getUpdates returns an empty result array
Send a message to the bot (or group) first, then call getUpdates again. The API only returns recent messages.
403 when calling the PingBase API
Alert channels require a Pro plan. Upgrade at app.pingba.se under Settings → Billing.
Ready to set this up?
PingBase Pro is $9/month. Includes Telegram, Slack, Discord, 10 monitors, and custom status pages.