Add an emoji reaction

Add an emoji reaction to a message.


Usage examples

#!/usr/bin/env python3

import zulip

# Pass the path to your zuliprc file here.
client = zulip.Client(config_file="~/zuliprc")

# Add an emoji reaction
request = {
    'message_id': str(message_id),
    'emoji_name': 'octopus',

result = client.add_reaction(request)

curl -sSX POST \
    -d 'emoji_name=octopus'


message_id required

Example: 42

The ID of the message that you want to add an emoji reaction to.

emoji_name required

Example: "octopus"

Name of the emoji you want to add as as a reaction.

To find an emoji's name, hover over a message to reveal three icons on the right, then click the smiley face icon. Images of available reaction emojis appear. Hover over the emoji you want, and note that emoji's text name.

emoji_code optional

Example: "1f419"

An encoded version of the unicode codepoint. For most clients, you won't need this; it's used to handle a rare corner case when upvoting a unicode emoji reaction added previously by another user.

If the existing reaction was added when the Zulip server was using a previous version of the emoji data mapping from codepoints to human-readable names, sending the emoji_code in the data for the original reaction allows the Zulip server to correctly consider your upvote as an upvote rather than a reaction with a "diffenent" emoji.

reaction_type optional

Example: "unicode_emoji"

If you are reacting with a custom emoji, set reaction_type to realm_emoji.


Example response

A typical successful JSON response may look like:

    "msg": "",
    "result": "success"