telegram api method · layer 229 · #973478b6
contacts.getTopPeers
Get most used peers
definition
contacts.getTopPeers#973478b6 flags:# correspondents:flags.0?true bots_pm:flags.1?true bots_inline:flags.2?true phone_calls:flags.3?true forward_users:flags.4?true forward_chats:flags.5?true groups:flags.10?true channels:flags.15?true bots_app:flags.16?true bots_guestchat:flags.17?true offset:int limit:int hash:long = contacts.TopPeers;
parameters
| name | type | description |
|---|---|---|
flags | # | Flags, see TL conditional fields |
correspondents | true | Users we've chatted most frequently with |
bots_pm | true | Most used bots |
bots_inline | true | Most used inline bots |
phone_calls | true | Most frequently called users |
forward_users | true | Users to which the users often forwards messages to |
forward_chats | true | Chats to which the users often forwards messages to |
groups | true | Often-opened groups and supergroups |
channels | true | Most frequently visited channels |
bots_app | true | Most frequently used Main Mini Bot Apps. |
bots_guestchat | true | |
offset | int | Offset for pagination |
limit | int | Maximum number of results to return, see pagination |
hash | long | Hash used for caching, for more info click here |
returns
errors (3)
| code | error | description |
|---|---|---|
| 400 | BUSINESS_CONNECTION_NOT_ALLOWED | This method was invoked over a business connection using invokeWithBusinessConnection, but either (1) we're a user, and users cannot invoke methods over a business connection; (2) we're a bot, but business mode was disabled in @botfather or (3); we're a bot, but this method cannot be invoked over a business connection. |
| 400 | TYPES_EMPTY | No top peer type was provided. |
| 401 | AUTH_KEY_UNREGISTERED | The specified authorization key is not registered in the system (for example, a PFS temporary key has expired). |
history
present in layers 62–229 · constructor id changed 1×
| id | layers |
|---|---|
| #d4982db5 | 62–132 |
| #973478b6 | 133–229 |