Answer the question
In order to leave comments, you need to log in
How to invite users to a private channel via telethon?
Here is a piece of code in the documentation
from telethon.sync import TelegramClient
from telethon import functions, types
with TelegramClient(name, api_id, api_hash) as client:
result = client(functions.channels.InviteToChannelRequest(
channel='username',
users=['username']
))
print(result.stringify())
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question