ImportChatInviteRequest
Only users can use this request. See code examples.
---functions--- messages.importChatInvite#6c50051c hash:string = Updates
Returns
Updates |
This type can be an instance of either:
UpdateShort | UpdateShortChatMessage |
UpdateShortMessage | UpdateShortSentMessage |
Updates | UpdatesCombined |
UpdatesTooLong |
Parameters
hash | string |
Known RPC errors
This request can cause 8 known errors:
ChannelsTooMuchError | You have joined too many channels/supergroups. |
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. |
InviteRequestSentError | You have successfully requested to join this chat or channel. |
SessionPasswordNeededError | Two-steps verification is enabled and a password is required. |
UsersTooMuchError | The maximum number of users has been exceeded (to create a chat, for example). |
UserAlreadyParticipantError | The authenticated user is already a participant of the chat. |
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.ImportChatInviteRequest( hash='A4LmkR23G0IGxBE71zZfo1' )) print(result.stringify())