As far as I read the Telegram Bot API's docs, Telegram do not limit the calls to your webhook callback in any way.
I am creating a Telegram Bot that will be available only for groups and channels that I will whitelist.
I can filter out the messages I get in my webhook callback. However, a malicious user can add my bot to a thousand big groups and will possibly result in denial of service for all other users.
Even if Telegram have implemented some rate limiting such user actions may still result in denial of service for all other users.
How can I specify the groups and the channels a Telegram bot can be added to.
You can do it using BotFather: /setjoingroups — toggle whether your bot can be added to groups or not. Any bot must be able to process private messages, but if your bot was not designed to work in groups, you can disable this.
So let's get started. Disclaimer: Telegram does not allow adding more than 200 members to a group or channel by one account. Using this script, I am able to add around 150-200 members with 60 second sleep between each add; after that, you have to change to another Telegram account/number.
5) Lock your chats Along with end-to-end encryption, Telegram also allows its users to lock their chats. To enable the passcode lock feature on your Telegram account, go to Settings > Privacy and Security > Passcode Lock, and toggle it on.
That feature does not exist. Either you allow all or none.
In addition to filtering, you could use leaveChat to immediately leave groups that are not on your whitelist.
And there is privacy mode which could make it harder for a malicious user.
You can do it using BotFather:
/setjoingroups
— toggle whether your bot can be added to groups or not. Any bot must be able to process private messages, but if your bot was not designed to work in groups, you can disable this.
https://core.telegram.org/bots
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With