Your home at your fingertips

Telegram Chatbot Privacy

Home >> Node-RED App Library

Follow these steps to restrict the access to your Telegram Chatbot:

Step 1: Find the Telegram chatId of your Bot.

  • Add a debug node to the two output of the Telegram in node as shown in the screenshot.
  • Save the flow
  • Send a text message from a Telegram chat client -> you should see the message in the debug window
  • Open the debug message and copy the chatId

Step 2: Add the Telegram chatId to the allowed ChatIds

  • Open the configuration of the Telegram node (double-click the ‘Telegram in’, then select the pen)
  • Enter the chatId as in the sceenshot below
  • Save the flow

Step 3: Verification

  • Verify that you can chat with the bot
  • Share the name of the bot with someone (copy the username @thenbot and share with someone).
  • This connection should be refused, you can see this in Node-RED debug “Unauthorized incoming call from undefined” from the second output. The person will not get a reply. You may add the chatId of this person to the list.

Step 4: Finalize

  • Save the Chat Id for later use
  • Delete or disable the debug node to avoid excessive logging