messages.getDialogs #

Returns the current user dialog list.

Layer 223

messages.dialogs#15ba6c40 dialogs:Vector<Dialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Dialogs;
messages.dialogsSlice#71e094f3 count:int dialogs:Vector<Dialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Dialogs;
messages.dialogsNotModified#f0e3e596 count:int = messages.Dialogs;
---functions---
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 #

NameTypeDescription
flags#Flags, see TL conditional fields
exclude_pinnedflags.0?trueExclude pinned dialogs
folder_idflags.1?intPeer folder ID, for more info click here
offset_dateintOffsets for pagination, for more info click here
offset_idintOffsets for pagination, for more info click here (top_message ID used for pagination)
offset_peerInputPeerOffset peer for pagination
limitintNumber of list elements to be returned
hashlongHash used for caching, for more info click here

Result #

messages.Dialogs

Only users can use this method #

Possible errors #

CodeTypeDescription
400CHAT_NOT_MODIFIEDNo changes were made to chat information because the new information you passed is identical to the current information.
403CHAT_WRITE_FORBIDDENYou can't write in this chat.
400FOLDER_ID_INVALIDInvalid folder ID.
400OFFSET_PEER_ID_INVALIDThe provided offset peer is invalid.
400PINNED_DIALOGS_TOO_MUCHToo many pinned dialogs.
400TAKEOUT_INVALIDThe specified takeout ID is invalid.

Dialog folders #

Telegram allows placing chats into folders, based on their type, mute status, or other custom criteria, thanks to folder blacklists and whitelists.

Pagination in the API #

How to fetch results from large lists of objects.