powered by
Creates a preconfigured httr2 client to call Evolution API v2. It sets the apikey header, a custom User-Agent and basic automatic retries.
apikey
The returned object is used by every send_*() function and stores the base request (req) and the instance name so you don't have to repeat them.
send_*()
req
evo_client(base_url, api_key, instance)
An object of class evo_client with fields req (httr2 request) and instance.
evo_client
instance
Character. Server base URL (no trailing slash), e.g. "https://your-host".
"https://your-host"
Character. API key (sent as apikey header). Prefer Sys.getenv("EVO_APIKEY") to avoid hardcoding secrets.
Sys.getenv("EVO_APIKEY")
Character. Instance name/ID used in endpoint paths.
send_text(), send_media(), send_location()
send_text()
send_media()
send_location()
if (FALSE) { client <- evo_client( base_url = "https://your-evolution-host.com", api_key = Sys.getenv("EVO_APIKEY"), instance = "myInstance" ) }
Run the code above in your browser using DataLab