Client Reference
This page contains a summary of all the important methods and properties that you may need when using Grammers-Python. They are sorted by relevance and are not in alphabetical order.
You should use this page to learn about which methods are available, and if you need a usage example or further description of the arguments, be sure to follow the links.
Client
This is a summary of the methods and properties you will find at Client.
Net
|
Invoke a raw API call. |
|
low-level api, send data to telegram directly. |
Utilities
|
Start login in to telegram |
|
Stop client Calling clent's methods after stopping will raise ClientStoppedError. |
|
Block until the event pool finishes or a termination signal is received (SIGINT / SIGTERM). |
Shortcut run method, which automatically invoke Client.start() and Client.stop(). |
Auth
|
Returns true if the current account is authorized. |
|
Terminal interactive login. |
|
Signs in to the bot account associated with this token. |
|
Requests the login code for the account associated to the given phone number via another Telegram application or SMS. |
|
Signs in to the user account. |
|
Extract information needed for the two-factor authentication It's called automatically when we get SESSION_PASSWORD_NEEDED error during sign in. |
|
Sign in using two-factor authentication (user password). |
|
Signs out of the account authorized by this client's session. |
|
Signals all clients sharing the same sender pool to disconnect. |
Chats
|
Fetch information about the currently logged-in user. |
|
Resolves a username (not prefix with '@') into the peer that owns it, if any. |
|
Resolves a phone to a User. |
|
Resolves a InputPeer into a Peer. |
|
Resolves any InputPeerLike to a Peer. |
|
Resolves any InputPeerLike to a PeerRef, with using cached access_hash. |
|
Check the validity of a chat invite link and get basic info about it. |
|
Import a chat invite and join a private chat/supergroup/channel. |
Messages
|
Get messages by id |
|
Returns the conversation history with one interlocutor / within a chat |