Skip to content
Download Beeper

Add a reaction

chats.messages.reactions.add(strmessage_id, ReactionAddParams**kwargs) -> ReactionAddResponse
POST/v1/chats/{chatID}/messages/{messageID}/reactions

Add a reaction to an existing message.

ParametersExpand Collapse
chat_id: str

Chat ID. Input routes also accept the local chat ID from this installation when available.

message_id: str

Message ID.

reaction_key: str

Reaction key to add (emoji, shortcode, or custom emoji key)

minLength1
transaction_id: Optional[str]

Optional transaction ID for deduplication and send tracking

ReturnsExpand Collapse
class ReactionAddResponse:
chat_id: str

Chat ID. Input routes also accept the local chat ID from this installation when available.

message_id: str

Message ID.

reaction_key: str

Reaction key that was added.

success: Literal[true]

Always true. Indicates the reaction was queued; failures return an error response.

transaction_id: str

Transaction ID used for send tracking.

Add a reaction

import os
from beeper_desktop_api import BeeperDesktop

client = BeeperDesktop(
    access_token=os.environ.get("BEEPER_ACCESS_TOKEN"),  # This is the default and can be omitted
)
response = client.chats.messages.reactions.add(
    message_id="1343993",
    chat_id="!NCdzlIaMjZUmvmvyHU:beeper.com",
    reaction_key="x",
)
print(response.chat_id)
{
  "chatID": "!whatsapp_15550101002:ba_EvYDBBsZbRQAy3UOSWqG0LuTVkc.local-whatsapp.localhost",
  "messageID": "1343993",
  "reactionKey": "❤️",
  "success": true,
  "transactionID": "txn_v3a8f4c9d2e1"
}
Returns Examples
{
  "chatID": "!whatsapp_15550101002:ba_EvYDBBsZbRQAy3UOSWqG0LuTVkc.local-whatsapp.localhost",
  "messageID": "1343993",
  "reactionKey": "❤️",
  "success": true,
  "transactionID": "txn_v3a8f4c9d2e1"
}