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:
| ChatInvite | ChatInviteAlready |
| ChatInvitePeek |
Parameters
| hash | string |
Known RPC errors
This request can cause 3 known errors:
InviteHashEmptyError | The invite hash is empty. |
InviteHashExpiredError | The chat the user tried to join has expired and is not valid anymore. |
InviteHashInvalidError | The 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())