Holds the credentials and HTTP settings used for every request.
Build one with KapsoEx.new/1 and pass it as the first argument to any
resource function. A client is a plain struct, so it is cheap to create one
per Kapso project (for example, one per customer when you are a Tech
Provider).
Fields
:api_key- Kapso project API key, sent asX-API-Key. Required for the Platform, Workflows and Kapso Agent APIs.:access_token- optional bearer token for the WhatsApp API. When set, WhatsApp requests sendAuthorization: Bearer <token>instead ofX-API-Key. Combined with:whatsapp_base_url, this lets you call Meta's Graph API directly.:whatsapp_base_url- defaults to"https://api.kapso.ai/meta/whatsapp/v24.0".:platform_base_url- defaults to"https://api.kapso.ai/platform/v1". Also used by the Workflows, Functions and Kapso Agent modules.:req_options- extra options merged into everyReqrequest, such as:receive_timeout,:retryor:plug(forReq.Teststubs).
Summary
Functions
Builds a client from opts, falling back to the :kapso_ex application
environment for any option that is not given.
Types
Functions
Builds a client from opts, falling back to the :kapso_ex application
environment for any option that is not given.
Raises ArgumentError when neither :api_key nor :access_token is set.