Learn R Programming

evolution (version 0.0.1)

send_text: Send a plain text message

Description

Sends a plain text WhatsApp message using Evolution API v2.

Usage

send_text(
  client,
  number,
  text,
  delay = NULL,
  link_preview = NULL,
  mentions_everyone = NULL,
  mentioned = NULL,
  quoted = NULL,
  verbose = FALSE
)

Value

A named list parsed from the JSON response returned by Evolution API, containing message metadata (IDs, timestamps, queue information) and any additional fields defined by the endpoint. The HTTP status code is stored in attr(result, "http_status"). This output represents the API confirmation that the text message was processed.

Arguments

client

An evo_client() object.

number

Character. Recipient in E.164 format (e.g., "+5581999...").

text

Character. Message body.

delay

Integer (ms). Optional presence delay before sending.

link_preview

Logical. Enable URL link preview.

mentions_everyone

Logical. Mention everyone (if applicable).

mentioned

Character vector of JIDs to mention (e.g., jid("+55...")).

quoted

Optional list with Baileys message key and message (reply-to).

verbose

Logical. If TRUE, logs request/response details with cli and enables req_verbose().

Examples

Run this code
if (FALSE) {
client <- evo_client("https://evolution_api_host", Sys.getenv("EVO_APIKEY"), "chatArgus")
send_text(client, "+55819...", "Ola", delay = 123, link_preview = FALSE, verbose = TRUE)
}

Run the code above in your browser using DataLab