Integration

Telegram

Send alerts directly to your Telegram chat or group.

Prerequisites

  • A Telegram account
  • A Talarius account with a project created
1

Create a Telegram Bot

Open Telegram and search for @BotFather. Start a chat and send:

/newbot

Follow the prompts to:

  1. Give your bot a name (e.g., "My App Alerts")
  2. Give your bot a username (e.g., "myapp_alerts_bot")

BotFather will give you a bot token that looks like:

1234567890:ABCdefGHIjklMNOpqrsTUVwxyz

Save this token - you'll need it in step 3.

2

Get Your Chat ID

You need the chat ID where alerts will be sent. This can be a private chat with the bot or a group.

For private chat:

  1. Start a chat with your new bot
  2. Send any message to the bot
  3. Open this URL in your browser (replace YOUR_BOT_TOKEN):
https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdates

Look for "chat":{"id":123456789} in the response.

For group chat:

  1. Add your bot to the group
  2. Send a message in the group
  3. Use the same getUpdates URL above
  4. Group chat IDs are negative numbers (e.g., -123456789)
3

Configure in Talarius

In your Talarius dashboard:

  1. Go to your project settings
  2. Select Telegram as destination type
  3. Enter your Bot Token
  4. Enter your Chat ID
  5. Click Test Connection
  6. Save the configuration

Send a Test Alert

Test your integration with a quick curl command:

curl
curl -X POST https://v1.talarius.io/alerts \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title": "Test Alert", "body": "Telegram integration is working!"}'

How alerts appear

Alerts are formatted as Telegram messages with clear structure:

My App Alerts

Server Alert

CPU usage exceeded 90% on production-web-1

Priority: high

Troubleshooting

Bot not responding?

Make sure you've started a conversation with the bot first. Bots can't initiate conversations.

Getting "chat not found" errors?

Double-check your chat ID. Remember that group IDs are negative numbers.

Alerts not appearing in group?

Ensure your bot has permission to send messages in the group. Some groups require admin approval.