Setup Telegram Bot

This document helps to setup your telegram to receive messages from MyController.
MyController needs a telegram token and a chat id and/or group id to send a messages.

Create a telegram bot

Open Telegram messenger, sign in to your account or create a new one.

  1. Enter @Botfather in the search tab and choose this bot.
    Note: official Telegram bots have a blue checkmark beside their name
  2. Click START to activate BotFather bot. In response, you receive a list of commands to manage bots.
  3. Choose or type the /newbot command and send it.
  4. Choose a name for your bot. And choose a username for your bot, the bot can be found by its username in searches. The username must be unique and end with the word bot
  5. After you choose a suitable name for your bot, the bot is created. You will receive a message with a link to your bot t.me/<bot_username>, recommendations to set up a profile picture, description, and a list of commands to manage your new bot.
  6. To connect a bot to MyController you need a token. Copy your token value and add it in to Telegram handler.

Get user chat id

User chat id can be extracted via API or with a supported bot.
Here the details are given to get chat id via MyController.org bot

  • On your telegram application on the search input enter mycontroller_org_bot.
    You can see MyController.org bot bot as shown blow.
    telegram search mycontroller bot

  • Click on the START to get connect with MyController.org bot
    telegram start mc bot

  • MyController.org bot info will be as below,
    telegram mc bot info

  • Send a text chat id, you will get a response with your chat_id
    telegram get chat id

Get group chat id

Group id can be extracted via API or with a known bot.
Here the details are given to get group id via MyController.org bot

  • Open your group and click on Add members
    telegram add member

  • on the search input type mycontroller_org then select MyController.org bot and click on ADD
    telegram add to group

  • Send a text chat id, you will get a response with your group_id and chat_id
    telegram group id

Last modified May 12, 2021: add handler and appendix page (fa816d3)