Telegram integration
The Telegram integration uses the Site Qwality bot. You send the bot a one-time code from the chat you want alerts in, and Site Qwality records the chat ID.
Set up
Section titled “Set up”-
Go to Manage → Integrations and click the Telegram card. Give the integration a name and click Start setup.
-
The dashboard shows a link to the Site Qwality bot (
t.me/SiteQwality_bot) that carries a one-time setup code. Open it in Telegram and press Start. This sends/start <setup-code>to the bot, which records the chat. The bot does not reply. For a group chat, add the bot to the group instead, then send/start <setup-code>in the group. -
Back in Site Qwality, click Check. When it shows Completed, click Add integration. The integration is created for that chat.
Send the code to the bot within 15 minutes of starting the setup, and finish adding the integration within the hour. Otherwise, start again.
To script the same flow through the API:
# Step 1: start the setup; the response includes setup_code and expires_atcurl -X POST https://api.siteqwality.com/integration/telegram/start \ -H "Authorization: Bearer $SITEQWALITY_API_KEY"Send /start <setup-code> to the bot from the chat you want to use, then:
# Step 2: poll until chat_id is setcurl "https://api.siteqwality.com/integration/telegram/get_setup_state?setup_state_code=<setup-code>" \ -H "Authorization: Bearer $SITEQWALITY_API_KEY"
# Step 3: finalize once chat_id is non-nullcurl -X POST https://api.siteqwality.com/integration/telegram \ -H "Authorization: Bearer $SITEQWALITY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "friendly_name": "Personal Telegram", "setup_code": "<setup-code>" }'Add it to a notification group
Section titled “Add it to a notification group”Right after you add the integration, the dashboard offers to do this for you: choose a group or create one, choose which monitors alert that group (the ones that already do, every monitor, or ones you pick), then send a test. If you skipped it, Route alerts on the integration’s card opens the same step. To do it by hand:
-
Go to Respond → Notifications. Click a group’s name to open it, or click Add group to make a new one.
-
Under Notifications, click Add notification method. Set Notification type to Telegram and choose this integration under Integration.
-
Click Done editing, then Save changes (Create group for a new group).
Through the API, create the channel with POST /notification:
curl -X POST https://api.siteqwality.com/notification \ -H "Authorization: Bearer $SITEQWALITY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "notification_group_id": "<your-group-id>", "type": "telegram", "details": { "telegram_integration_id": "<telegram-integration-id>" } }'Format
Section titled “Format”For an HTTP monitor, a message has a title (Monitor Down or Monitor Up), the monitor and the URL that was checked. A down message adds the time and the failure reason; a recovery adds when the outage started, when it resolved and the total downtime. Other monitor types send their own short summary. Messages have no link back to Site Qwality.
- One integration per chat. Use multiple integrations for multiple destinations.
- A send is tried once, and a refusal from Telegram is recorded as rejected. Any other failure, a rate limit included, runs the send again up to twice, so a duplicate message is possible. If those runs fail too, the alert is dropped with no record in alert history. See delivery guarantees.
- Telegram is a recipient you choose. Telegram processes the messages under its own terms; it is not a Site Qwality subprocessor.