CheckChatInviteRequest

Only users can use this request. See code examples.

---functions---
messages.checkChatInvite#3eadb1bb hash:string = ChatInvite

Returns

ChatInvite

This type can be an instance of either:

ChatInviteChatInviteAlready
ChatInvitePeek

Parameters

hashstring

Known RPC errors

This request can cause 3 known errors:

InviteHashEmptyErrorThe invite hash is empty.
InviteHashExpiredErrorThe chat the user tried to join has expired and is not valid anymore.
InviteHashInvalidErrorThe invite hash is invalid.

You can import these from telethon.errors.

Example

from telethon.sync import TelegramClient
from telethon import functions, types

with TelegramClient(name, api_id, api_hash) as client:
    result = client(functions.messages.CheckChatInviteRequest(
        hash='A4LmkR23G0IGxBE71zZfo1'
    ))
    print(result.stringify())