Layer 220
method Users
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 offset:int limit:int hash:long = contacts.TopPeers;

Parameters

Name Type Description
Flags # Flags, see TL conditional fields
Correspondents flags.0?true Users we've chatted most frequently with
BotsPm flags.1?true Most used bots
BotsInline flags.2?true Most used inline bots
PhoneCalls flags.3?true Most frequently called users
ForwardUsers flags.4?true Users to which the users often forwards messages to
ForwardChats flags.5?true Chats to which the users often forwards messages to
Groups flags.10?true Often-opened groups and supergroups
Channels flags.15?true Most frequently visited channels
BotsApp flags.16?true Most frequently used Main Mini Bot Apps.
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

Possible Errors

Code Type Description
400 TYPES_EMPTY No top peer type was provided.

Gogram Example

// ContactsGetTopPeers - using Params struct
result, err := client.ContactsGetTopPeers(&tg.ContactsGetTopPeersParams{
    Offset: 0,
    Limit: 0,
    Hash: int64(0),

    // Optional fields:
    // Correspondents: true,
    // BotsPm: true,
    // BotsInline: true,
    // PhoneCalls: true,
    // ...
})
if err != nil {
    // handle error
}
// result is *tg.ContactsTopPeers