Add an Emoji Reaction to a Message

Add an emoji reaction to a specific message within an active message session.

Restrictions

This operation is only supported for WhatsApp and Live Chat messaging channels.

Request URL

POST {base_url}/{api_path}/message/reaction?access_token={access_token}

Request parameters

Parameter Required Type Description
emoji Yes String The emoji character to be added.
Note: You can query the available emojis using Get Menu Options (menu=emoji).
msg_id Yes Integer The ID of the message to which you want to reply with an emoji.
Note: You can query the message ID using Query Messages in a Message Session.
sender_type Yes Integer The type of the sender.
Valid value:
  • 1: Extension user.
  • 9: Third-party message analytics platform (transmitted via API)
sender_no No String The identifier of the sender.
Valid value:
  • If sender_type is set to 1, this parameter is REQUIRED, which can be used to specify the extension number.
  • If sender_type is set to 9, enter api or leave it blank.

Response parameters

Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.

Examples

Request example
Tip: To remove an emoji reaction, call this API again with the same emoji and msg_id. The reaction will be removed if it exists.
POST /openapi/v1.0/message/reaction?access_token=YFDLCQxMq0oHzKNRQpMunoFU1NLaSP3f HTTP/1.1

Host: yeastardocs.example.yeastarcloud.com
Content-Type: application/json

{
    "emoji": "👍",
    "msg_id": 123,
    "sender_no": "3200",
    "sender_type": 1
}

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS"
}