Learn R Programming

evolution (version 0.1.0)

send_whatsapp_audio: Send WhatsApp audio (voice note)

Description

Sends an audio message (push-to-talk / voice note) via Evolution API v2.

Usage

send_whatsapp_audio(
  client,
  number,
  audio,
  delay = NULL,
  quoted = 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.

number

Character. Recipient number with country code (e.g., "5581999990000" or "+5581999990000").

audio

URL, base64-encoded audio, or local file path (auto-encoded to base64). Supports ~ expansion.

delay

Integer (ms). Optional presence delay before sending. Simulates typing before the message is sent.

quoted

Optional list with Baileys message key and message to reply to a specific message.

verbose

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

Examples

Run this code
if (FALSE) {
send_whatsapp_audio(client, "5581999990000",
                    audio = "https://example.com/note.ogg")
}

Run the code above in your browser using DataLab