telegram api method · layer 229 · #4dc5085f

messages.deleteSavedHistory

usable by users

Deletes messages from a monoforum topic », or deletes messages forwarded from a specific peer to saved messages ».

definition

messages.deleteSavedHistory#4dc5085f flags:# parent_peer:flags.0?InputPeer peer:InputPeer max_id:int min_date:flags.2?int max_date:flags.3?int = messages.AffectedHistory;

parameters

nametypedescription
flags#Flags, see TL conditional fields
parent_peerflags.0?InputPeerIf set, affects the messages of the passed monoforum topic », otherwise affects saved messages ».
peerInputPeerPeer, whose messages will be deleted from saved messages », or the ID of the topic.
max_idintMaximum ID of message to delete
min_dateflags.2?intDelete all messages newer than this UNIX timestamp
max_dateflags.3?intDelete all messages older than this UNIX timestamp

returns

messages.AffectedHistory

errors (3)

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.
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
#6e98102b170–203
#4dc5085f204–229