Telegram

Domotz Telegram Integration

Domotz Telegram Integration

Domotz includes integration with Telegram, a cloud-based mobile and desktop messaging app with a focus on security and speed.

Setting up a Telegram webhook for a shared channel in Domotz

Users can receive Domotz alerts on Telegram. All you need to do is create a Telegram bot API token and retrieve the Chat ID of the channel where you want to receive the messages.

Domotz Telegram Integration - Add a Telegram Incoming Webhook

Create a Telegram bot API token

  1. Create a Telegram bot.
    To obtain a Telegram bot API token, you need to create a Telegram bot.
    Learn how to create a Telegram bot here.
  2. Obtain the API token information.
    After you create the Telegram bot, you can obtain the API token information by talking to Telegram bot @BotFather, using /mybots command, and following instructions:
  • Create a new conversation searching for @BotFather Telegram bot.
  • Type command /newbot and follow instructions.

At the end of this procedure, you will obtain the API token which is the first information required to set up your Telegram webhook.

Domotz Telegram Integration - Telegram webhook BotFather message

Obtain a Telegram Chat ID

Start receiving Domotz alerts on Telegram by obtaining a chat ID for a chat or a group where your Telegram bot is in.

How to obtain a Telegram chat ID:

  1. Create a Telegram group.
  2. Invite your Telegram bot in it.
  3. Start the chat by sending a message.
  4. Open the following link to generate a JSON message https://api.telegram.org/bot<BOT_API_TOKEN>/getUpdates
  5. Copy the id value from the JSON message to your chat.

This will be the Chat ID required to configure the Telegram webhook:

Domotz Telegram Integration - Telegram webhook JSON message

Note: You can use other Telegram bots able to display the Chat ID in the group itself.

Updated on May 1, 2021

Was this article helpful?