Developers » API methods » Messages » messages.pin
Messagesmessages.pin
Pin the message
This method can be called with a user token received in Standalone-app via Implicit Flow. Access rights required: messages.
This method can be called with a community token. Access rights required: messages.
Parameters
peer_idassignment id.

For the user:
user id.

For group chats::
2000000000 + chat id.

For communities:
community -id.

int (number), required parameter
message_idid of the message that needs to be pinned
positive number
conversation_message_idid of the group chat message that needs to be pinned
The parameter is meant for pinning messages from bots in conversations.
positive number
Result
Returns an object representation of the pinned message.
Errors
925You are not admin of this chat
942Cannot pin one-time story
Global errors can occur while running. See their descriptions on this page.