Create a Telegram bot
- Open BotFather in Telegram and send
/newbot. - Follow the instructions to name your bot and choose its username.
- Copy the bot token that BotFather provides. Keep it private; anyone with the token can control your bot.
Find your chat ID
- Open your new bot in Telegram and send
/start. - Open
https://api.telegram.org/bot<TOKEN>/getUpdates, replacing<TOKEN>with your bot token. - In the response, copy the value of
result[0].message.chat.id.
result is empty, send another message to your bot and reload the URL.
Add Telegram to Midway
Run the Midway setup command and paste the bot token and chat ID when prompted:notification.send_to and include Telegram; configured methods left out of the list will not receive notifications. With pick_from: All, Midway sends through every method listed there:
pick_from can further select a subset of the methods in send_to for each notification.
You can also add them directly to midway.yaml under tokens.telegram: