# Telegram alerts

> Link a Telegram chat and get a message when a log session grows past a threshold or the daily quota runs low.

JustLog3 Cloud can message you in Telegram, so you hear about a runaway job or a spent quota without keeping the dashboard open. Alerts come from the bot [@justlog3cloud_bot](https://t.me/justlog3cloud_bot).

## Link a chat

1. Open the dashboard and find the **Telegram notifications** panel.
2. Click **Create secure link**. The link works once and expires in five minutes.
3. Open it in Telegram and press **Start**. The panel switches to *Connected*.

Your API token is never sent to Telegram: linking uses the one-time link only. To unlink, press **Disconnect** on the dashboard or send `/unconnect` to the bot.

## What you get alerts about

- **Session thresholds.** Every time one session (one run of your program, the `X-JustLog-Session` header) grows past another 100 lines, you get one message with the session and its line count. A loop that suddenly logs 50,000 lines is hard to miss.
- **Daily quota.** One message when 80% of today's log lines are used and one at 100%. After that, new lines are rejected until 00:00 UTC.
- **Plan renewal.** A reminder when a paid plan has expired and its 3-day grace period has started.

## Delivery

Alerts are queued with the logs that caused them and sent in the background, so sending logs never waits for Telegram. A message that fails is retried up to five times. If you block the bot or delete the chat, the chat is unlinked automatically.
