Skip to content
All integrations

Telegram bot setup

Telegram is the cheapest channel — free and unlimited. Each user registers their chat with your SafeOS bot, then receives alerts at medium severity and above.

Setup (server operator)

  1. Open Telegram and message @BotFather. Send /newbot.
  2. Choose a display name and a username ending in _bot.
  3. BotFather replies with an HTTP API token — copy it.
  4. Add it to your API server's .env:
TELEGRAM_BOT_TOKEN=1234567890:ABCdefGHIjklMNOpqrSTUvwxYZ

Restart the API server for the change to take effect.

Setup (each recipient)

  1. Search for your bot by username in Telegram and tap Start.
  2. Send /register. The bot replies with a confirmation; the chat ID is now registered with your SafeOS server.
  3. Toggle Send Telegram alerts in Settings → Notifications.
  4. Run a medium-severity test alert to verify.

Reference: Telegram Bot API docs.