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?
2 Answers
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