Learn R Programming

evolution (version 0.1.0)

send_status: Send a WhatsApp Status (story)

Description

Posts a status (story) message visible to your contacts. Supports text or media (image, video, document, audio) types.

Usage

send_status(
  client,
  type = c("text", "image", "video", "document", "audio"),
  content,
  caption = NULL,
  background_color = NULL,
  font = NULL,
  all_contacts = FALSE,
  status_jid_list = NULL,
  verbose = FALSE
)

Value

A named list with the API response. The HTTP status code is stored in attr(result, "http_status").

Arguments

client

An evo_client() object.

type

One of "text", "image", "video", "document", "audio".

content

Text (for type = "text") or URL/base64 for media.

caption

Optional caption for media types.

background_color

Hex colour for text status background (e.g., "#FF5733").

font

Integer font id (0--14).

all_contacts

Logical. If TRUE, sends to all contacts.

status_jid_list

Optional character vector of specific JIDs to receive the status.

verbose

Logical. If TRUE, logs request/response details with cli.

Examples

Run this code
if (FALSE) {
send_status(client, type = "text", content = "Hello from R!",
            background_color = "#317873", font = 2, all_contacts = TRUE)
}

Run the code above in your browser using DataLab