Learn R Programming

whapi (version 0.0.2)

whapi_react_to_message: React to a WhatsApp message (Whapi.Cloud)

Description

Sends (or removes) an emoji reaction to a message via PUT /messages/{MessageID}/reaction. The endpoint returns only { "success": true | false }.

Usage

whapi_react_to_message(
  message_id,
  emoji,
  token = Sys.getenv("WHAPI_TOKEN", unset = ""),
  timeout = 30,
  verbose = TRUE
)

Value

A tibble with columns:

  • id - message_id reacted to

  • emoji - emoji used (or "" if removed)

  • status - "ok" if success, "error" otherwise

  • success - logical flag from API

  • resp - raw response (list)

Arguments

message_id

Character(1). Target message ID (WAMID).

emoji

Character(1). Emoji to react with. To remove a reaction, pass an empty string "".

token

Character(1). Bearer token. Defaults to env var WHAPI_TOKEN.

timeout

Numeric(1). Request timeout in seconds. Default: 30.

verbose

Logical(1). Print CLI logs? Default: TRUE.