Skip to content

reaction_add

Add a reaction from the signed-in user to one message. Use it when someone clicks an emoji under a message or picks one from a reaction menu.

{
"cmd": "reaction_add",
"channel": "general",
"id": "8f14e45f-ceea-467a-9575-3d3b4c1b2a10",
"emoji": "👍"
}
Field Type Required Description
channel string One of channel or thread_id Name of the channel that holds the message. Leave it out for a thread message.
thread_id string One of channel or thread_id ID of the thread that holds the message. If you also send channel, it must be the thread’s parent forum.
id string Yes ID of the message to react to.
emoji string Yes The reaction, 1 to 200 characters. See emoji formats.

emoji must be one of:

  • A single Unicode emoji, such as 👍.
  • A custom emoji reference in the form originChats:<emoji>//<server_url>/<emoji_id>.
  • The older custom emoji form originChats://<server_url>/emojis/<emoji_id>. It is still accepted, but new clients should send the form above.

See emoji, stickers and attachments for how custom emoji work.

{
"cmd": "reaction_add",
"channel": "general",
"id": "8f14e45f-ceea-467a-9575-3d3b4c1b2a10",
"emoji": "👍",
"from": "alice",
"total": 3
}
  • from is the username of the user who reacted.
  • total is how many users now have this emoji on the message.
  • For a thread message, channel is the parent forum and the frame also has thread_id.

The same frame is broadcast to every other connection whose user can view the channel, without listener. Users severed from the reacting user don’t receive it. Severing hides two users from each other; a user with manage_users sets it with the /sever slash command.

Adding an emoji you already reacted with succeeds, but you are not counted twice.

You need to be able to view the channel (or the thread’s parent forum) and hold its react channel permission. By default every member with the user role can react. See roles and permissions.

The command is blocked while you are timed out.

val When
Invalid emoji format. Must be a bare emoji or 'originChats:<emoji>//<server_url>/<emoji_id>' emoji is not one of the accepted formats.
Channel not found The channel doesn’t exist, or you sent neither channel nor thread_id.
Thread not found No thread has this thread_id.
Thread does not belong to this channel channel is not the thread’s parent forum.
Messages must be sent inside a thread in forum channels channel is a forum. Send thread_id instead.
This channel does not support chat The channel type has no messages.
Access denied to this channel You can’t view the channel.
You do not have permission to view this thread You can’t view the thread’s parent forum.
You do not have permission to react in this channel You lack the react permission.
Message not found No message has this id in the channel or thread.
Too many reactions on this message, cannot add more The message already has the maximum number of different emoji. The limit is limits.max_reactions_per_message (default 20), which the handshake also reports.
Validation message A field is missing or has the wrong type or length, for example id: Expected length at least 1.