powered by
Sends a poll (question with selectable options) via Evolution API v2.
send_poll(client, number, name, values, selectable_count = 1L, verbose = FALSE)
A named list with the API response. The HTTP status code is stored in attr(result, "http_status").
attr(result, "http_status")
An evo_client() object.
evo_client()
Character. Recipient number with country code (e.g., "5581999990000" or "+5581999990000").
"5581999990000"
"+5581999990000"
Question text displayed in the poll.
Character vector of poll options (minimum 2).
Integer. Number of options a user can select (default 1L for single-choice).
1L
Logical. If TRUE, logs request/response details with cli.
TRUE
if (FALSE) { send_poll(client, "5581999990000", name = "Favourite language?", values = c("R", "Python", "Julia"), selectable_count = 1) }
Run the code above in your browser using DataLab