Eleirbag89 / TelegramBotPHP

A very simple PHP Telegram Bot API for sending messages.
http://eleirbag89.github.io/TelegramBotPHP
MIT License
800 stars 340 forks source link

How limit user access for the Bot? #236

Closed pablosouza10 closed 3 years ago

pablosouza10 commented 3 years ago

I'm want only specific user can Interact w/ bot I write a manual array w/ chat_id and checking If user are in array before response.

Anyone can send me a code with best way to users access control?

Ps: cant use groups for this.

Eleirbag89 commented 3 years ago

You are on the right track, I'll use the username instead of the chat_id. Maybe could Aldo ne usefull a database where you van save the lista of the allowed users to semplify the process?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.