• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Telegram: Control ESP32/ESP8266 Outputs

Q&A Forum › Category: ESP8266 › Telegram: Control ESP32/ESP8266 Outputs
0 Vote Up Vote Down
sialaichai asked 8 months ago

I read the tutorial on using telegram: https://randomnerdtutorials.com/telegram-control-esp32-esp8266-nodemcu-outputs/ 
Is it possible configure control access to different telegram users? 

Question Tags: telegram esp8266 esp32
2 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 8 months ago

Yes.
You can add more user IDs to your code. For example:

#define CHAT_ID_1 "XXXXXXXXXX"
#define CHAT_ID_2 "XXXXXXXXXX"

Then, in this line of code you must check all the valid IDs:

if (chat_id != CHAT_ID_1 || chat_id!=CHATID_2) {
  bot.sendMessage(chat_id, "Unauthorized user", "");
  continue;
}

I hope this answers your question.
Regards,
Sara

0 Vote Up Vote Down
sialaichai answered 8 months ago

Thanks Sara.

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Download Build Web Servers with ESP32 and ESP8266 (2nd Edition) February 8, 2021
  • [eBook Released] Build Web Servers with ESP32 and ESP8266 (version 1.0) October 27, 2020

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2021 · RandomNerdTutorials.com · All Rights Reserved