Chat API to add and remove members automatically

João Teixeira picture João Teixeira · Sep 11, 2018 · Viewed 8.6k times · Source

I'm working with a guy who uses telegram app to send bet tips on football matches. He wants the group to be private, right now he is adding and removing all members manually. The group is growing and now has more than 300 members which makes his job harder, what he wants is an automatic way of adding and removing members from the group . Is there any api that let me do this? I'm open to change to another chat app if it's needed.

Answer

Mohamed Sohail picture Mohamed Sohail · Sep 18, 2018

As with the bot API, it is NOT possible to add members directly to the group, you can still kick them out.

However what you are asking is still possible by using a user bot (MTPROTO client). If you are going to use PHP, I suggest you look at MadelineProto. I will list the methods you can use:

  1. channels.inviteToChannel (Works with supergroups)
  2. channels.editBanned (Works with supergroups)

Using the two methods you can easily achive your aim.