Telegram Bot Setup Help - MintyTrebor/BtnCmd GitHub Wiki

First - Install and configure Telegram on your phone/tablet according to the apps instructions.

  1. Open Telegram (or use telegram for web on pc)
  2. Search for BotFather and open a chat (make sure you get the approved one - there seems to lots of Jokers who have setup "alternates").
  3. Send /newbot
  4. Follow the prompts on screen to enter a name for your new Bot
  5. Once complete you will be given a HTTP API Token - Copy this token and keep it safe for now, you will need it later.
  6. Create a new group in Telegram and invite/add your new bot into the chat by its name.
  7. Select your bot in the group and promote them to admin so they can send messages to the group (you may alter other permissions as you see fit - providing the bot can still send messages to the group).
  8. Send a couple of random messages to the group to make it "active"
  9. Open a browser window and navigate to Hoppscotch.
  10. In the URL field enter https://api.telegram.org/bot<token>/getUpdates replacing <token> with the api token from step 5, and click send. Keep sending until you get a response like the below (it can take a few tries with a brand new group and bot, this is why we send a couple of test msgs in step 8).
  11. Copy the chat Id (starts with - eg -99999) and keep it safe for now, you will need it later.
  12. You now have everything you need to enable Telegram Event alerts from BtnCmd.
  13. When adding a new event in BtnCmd, select Telegram as the type and enter the API token and chat ID, and you will be up and running.
  14. If you want to confirm you have captured the right information you can test your token and chat id by navigating to Hoppscotch in a browser and postinghttps://api.telegram.org/bot<token>/sendMessage?chat_id=<chat id>&text=TestMSG replacing <token> & <chat id> with the values from steps 5 & 11 respectively. This should send a msg to the telegram group via the bot with the text "TestMSG".
⚠️ **GitHub.com Fallback** ⚠️