• 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 3 years 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 3 years 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 3 years 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] SMART HOME with RPi, ESP32, and ESP8266 (version 1.2) March 8, 2023
  • [eBook Updated] ESP32-CAM Projects (version 1.3) January 7, 2023

You must be logged in to view this content.

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

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

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.