Create Telegram Bot and get Bot's token and the Group's chat id

edited April 2019 in Knowledgebase

Create a Telegram group where Bot and you are members, and all other people that you want to send alarms to.
(You will create and make the Bot join the group in the next steps)

Talk to BotFather, goto @BotFather in Telegram or goto:

Create a new Bot

Enter name of your Bot

Enter username for Bot

Then you will see a token, something like this:
Copy token

In Telegram write

Select the Bot that should join the Alarm group
Click the Bot
Click Enable

Add the Bot to the group, the same procedure as when adding a normal person to a group.

You and the Bot should now be members of the Alarm group.

Now you need to get the ChatID for the group

If you forgot your bot token, go to Botfather in Telegram and write:
Click the correct bot and then click API Token

Then go to url:

Replace YOUR_BOT_TOKEN_THAT_YOU COPIED_ABOVE with your bot token.
Remember to write bot just before your token in the url

Look for "chat":{"id":-yyyyyyyyy,
-yyyyyyyyy is the groups chatid(it should have a negative sign)

If chatid is not shown when going to above url, remove bot from group and then add bot again.

Now you have both the Bot's token and Group's chatid, input them on the "Add/Edit display page"
Write "bot" before your token in the "Telegram token" box, example: bot110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw

Sign In or Register to comment.