Add member to telegram channel

6.2k Views Asked by At

I have been looking for a way to add a number of users to a telegram channel (with users id) for a long time and I didn't find anything. (I'm sure there is such a thing because I know people who do it but IDK and they don't tell me how it is done).

1

There are 1 best solutions below

1
On

First of all, please note that only the first 200 members can be added to a Telegram channel, and you should be aware that you are subject to get limited or banned if you abuse the Telegram API.

You can add members to a Telegram channel by calling the channels.inviteToChannel method.

If you use Python, you can do that easily with Pyrogram:

client.add_chat_members(
  channel_id,
  [user_ids],
)

You can also call the method easily with GramJS, if using JavaScript:

client.invoke(
  new Api.channels.InviteToChannel({
    channel: channelId,
    users: [userIds],
  })
)