Telegram
Goal: DownBad alerts arrive in a Telegram chat, group or channel.
Telegram doesn’t have webhook URLs like Slack. Instead you create your own bot, add it where alerts should go, and give DownBad the bot’s token and the chat’s ID. You need a paid DownBad plan.
- Create a bot. In Telegram, message @BotFather,
send
/newbot, and follow the prompts. BotFather replies with a bot token like123456789:AAH.... Anyone with it can post as your bot, so keep it private. - Add the bot where alerts should go.
- Group: add the bot as a member.
- Channel: add the bot as an administrator with permission to post.
- Private chat: open the bot and press Start, or Telegram refuses the message.
- Find the chat ID. Send a message in the group (or post in the channel),
then open
https://api.telegram.org/bot<your token>/getUpdatesin a browser and look for"chat":{"id":...}. Group and channel IDs start with-100. A public channel can use its@usernameinstead. - Add it in DownBad. Go to Settings › Alerts, press Add webhook
and paste
https://api.telegram.org/. DownBad recognizes it as Telegram and asks for:- Bot token: from step 1. (If you paste a URL that already contains the token, DownBad doesn’t ask again.)
- Chat ID: from step 3.
- Topic ID: optional, for a group with topics. Leave it empty to post in the General topic.
- Press Test now, then save and add the channel to the notification profiles that should use it.
Expected result
Section titled “Expected result”The bot posts a message headed DownBad WebHook Channel Integrated and marked as an integration test. Real alerts show the monitor, its status, the reason and a link to the incident.
Troubleshooting
Section titled “Troubleshooting”DownBad reads Telegram’s answer and tells you which value to fix.
“Check the bot token; BotFather may have revoked it.”
The token is wrong or was revoked (HTTP 401 or 404). Get the current token
from @BotFather with /mybots, then paste it again.
“Check the chat ID, and that the bot has been added to that group or
channel.”
Telegram can’t find the chat. Check the ID, including the leading -100,
and that the bot is still a member.
“Add the bot to the chat with permission to post; for a private chat, open the bot and press Start.” The bot was removed, isn’t allowed to post, or the person never started a chat with it (HTTP 403).
“The group became a supergroup; set the chat ID to …” Telegram gave the group a new ID when it was upgraded. Paste the new ID DownBad shows.
“Check the topic ID, or leave it empty.” The topic was deleted, or the number is wrong. Open the topic and check its number, or leave the field empty.
Alerts stopped and the bell says the webhook was switched off. Ten alerts in a row failed. Fix the cause above, then press Test now to switch the channel back on.