telegram api method · layer 229 · #998ab009

messages.getSavedHistory

usable by users

Fetch saved messages » forwarded from a specific peer, or fetch messages from a monoforum topic ».

definition

messages.getSavedHistory#998ab009 flags:# parent_peer:flags.0?InputPeer peer:InputPeer offset_id:int offset_date:int add_offset:int limit:int max_id:int min_id:int hash:long = messages.Messages;

parameters

nametypedescription
flags#Flags, see TL conditional fields
parent_peerflags.0?InputPeerIf set, fetches messages from the specified monoforum, otherwise fetches from saved messages.
peerInputPeerTarget peer (or topic)
offset_idintOnly return messages starting from the specified message ID
offset_dateintOnly return messages sent before the specified date
add_offsetintNumber of list elements to be skipped, negative values are also accepted.
limitintNumber of results to return
max_idintIf a positive value was transferred, the method will return only messages with IDs less than max_id
min_idintIf a positive value was transferred, the method will return only messages with IDs more than min_id
hashlongResult hash

returns

messages.Messages

errors (5)

codeerrordescription
400BUSINESS_CONNECTION_NOT_ALLOWEDThis 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.
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
400PARENT_PEER_INVALIDThe specified parent_peer is invalid.
400PEER_ID_INVALIDThe provided peer id is invalid.
401AUTH_KEY_UNREGISTEREDThe specified authorization key is not registered in the system (for example, a PFS temporary key has expired).

history

present in layers 170–229 · constructor id changed 1×

idlayers
#3d9a414d170–203
#998ab009204–229