Receive xyz.sh Test Notifications on Telegram
This tutorial shows how to receive xyz.sh test notifications with your own Telegram bot. The site does not host a bot for you; you always supply the token.
$ curl -fsSL xyz.sh/tg | bash
Details · xyz.sh/tg · Last updated:
Prerequisites
A Telegram account and a bot token from @BotFather.
The chat id of the destination (after you message the bot, query it with getUpdates or another reliable method).
curl on the machine.
Steps
Optional: read the source with curl -fsSL xyz.sh/tg.sh and compare xyz.sh/tg.sh.sha256.
Preview: curl -fsSL xyz.sh/tg | bash -s -- --token '<token>' --chat '<chat-id>' --dry-run
Send a test message: curl -fsSL xyz.sh/tg | bash -s -- --token '<token>' --chat '<chat-id>'
Notify when a full test finishes: curl -fsSL xyz.sh/all | bash -s -- -y --share --tg --tg-token '<token>' --tg-chat '<chat-id>'
Or set XYZ_TG_TOKEN and XYZ_TG_CHAT.
How to verify
On success the script prints that the message was sent and does not echo the token. The Telegram client should show a message. --dry-run makes no network request.
How to undo or uninstall
Nothing is installed on the server. To stop notifications, disable or delete the bot in Telegram and remove the token from commands and environment variables.