Reputation: 11
Hello i'm trying to add my self to a group in telegram using telethon.
i tried this:
from telethon.tl.functions.messages import ImportChatInviteRequest
updates = client(ImportChatInviteRequest('grouphash'))
but getting error:
Traceback (most recent call last): File "jg.py", line 12, in updates = client(ImportChatInviteRequest('grouphash'))
telethon.errors.rpcerrorlist.InviteHashInvalidError: The invite hash is invalid (caused by ImportChatInviteRequest)
Upvotes: 1
Views: 1921
Reputation: 41
you have to remove + in the hash example
link gruop https://t.me/+_7JK8SMJijw0ZjQx
so yo have to introduce only _7JK8SMJijw0ZjQx
client(ImportChatInviteRequest('_7JK8SMJijw0ZjQx'))
Upvotes: 1