Answer the question
In order to leave comments, you need to log in
How to invite a person to a channel using his chat_id in telethon?
Hello.
I'm trying to work with the telegram api, I found the function of inviting to the group chat and to the channel.
You can invite a user to a chat by chat_id, but I did not find such an opportunity to join the channel.
Tell me, is this possible?
If so, where can I find an example (or at least documentation about it).
(you don’t need to send a link to all the documentation, I already read it but didn’t find it)
Answer the question
In order to leave comments, you need to log in
from telethon.tl.functions.channels import InviteToChannelRequest
client(InviteToChannelRequest(
channel=<channel_id>
users = ['<username>']
))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question