Unpin all pinned messages

messages.affectedHistory#b45c69d1 pts:int pts_count:int offset:int = messages.AffectedHistory;
messages.unpinAllMessages#ee22b9a8 flags:# peer:InputPeer top_msg_id:flags.0?int = messages.AffectedHistory;


Name Type Description
flags # Flags, see TL conditional fields
peer InputPeer Chat where to unpin
top_msg_id flags.0?int  



Possible errors

Code Type Description
400 CHAT_ADMIN_REQUIRED You must be an admin in this chat to do this.
400 CHAT_NOT_MODIFIED The pinned message wasn't modified.

Bots can use this method

Related pages

Pinned messages

Telegram allows pinning multiple messages on top of a specific chat.