Layer 220
method Users
messages.getDialogs#a0f4cb4f flags:# exclude_pinned:flags.0?true folder_id:flags.1?int offset_date:int offset_id:int offset_peer:InputPeer limit:int hash:long = messages.Dialogs;

Parameters

Name Type Description
Flags # Flags, see TL conditional fields
ExcludePinned flags.0?true Exclude pinned dialogs
FolderId flags.1?int Peer folder ID, for more info click here
OffsetDate int Offsets for pagination, for more info click here
OffsetId int Offsets for pagination, for more info click here ( top_message ID used for pagination)
OffsetPeer InputPeer Offset peer for pagination
Limit int Number of list elements to be returned
Hash long Hash used for caching, for more info click here

Possible Errors

Code Type Description
400 CHAT_NOT_MODIFIED No changes were made to chat information because the new information you passed is identical to the current information.
403 CHAT_WRITE_FORBIDDEN You can't write in this chat.
400 FOLDER_ID_INVALID Invalid folder ID.
400 OFFSET_PEER_ID_INVALID The provided offset peer is invalid.
400 PINNED_DIALOGS_TOO_MUCH Too many pinned dialogs.
400 TAKEOUT_INVALID The specified takeout ID is invalid.

Gogram Example

// MessagesGetDialogs - using Params struct
result, err := client.MessagesGetDialogs(&tg.MessagesGetDialogsParams{
    OffsetDate: 0,
    OffsetId: 0,
    OffsetPeer: &tg.InputPeerUser{UserID: int64(123456789)},
    Limit: 0,
    Hash: int64(0),

    // Optional fields:
    // ExcludePinned: true,
    // FolderId: 0,
})
if err != nil {
    // handle error
}
// result is *tg.MessagesDialogs