Learn R Programming

evolution (version 0.0.1)

evo_client: Create an Evolution API client

Description

Creates a preconfigured httr2 client to call Evolution API v2. It sets the apikey header, a custom User-Agent and basic automatic retries.

Usage

evo_client(base_url, api_key, instance)

Value

An object of class evo_client with fields req (httr2 request) and instance.

Arguments

base_url

Character. Server base URL (no trailing slash), e.g. "https://your-host".

api_key

Character. API key (sent as apikey header).

instance

Character. Instance name/ID used in endpoint paths.

Examples

Run this code
if (FALSE) {
client <- evo_client("https://evolution_api_host", "KEY", "chatArgus")
}

Run the code above in your browser using DataLab