Helpers shared by the WhatsApp API modules.
The WhatsApp API (https://api.kapso.ai/meta/whatsapp/v24.0) proxies
Meta's WhatsApp Cloud API, so payloads and responses follow
Meta's documentation.
On top of that, Kapso stores history, which lets you list messages,
conversations, contacts and calls, and adds extra fields when you ask for
them with fields=kapso(...) (see kapso_fields/1).
Modules:
KapsoEx.WhatsApp.Messages- send and list messagesKapsoEx.WhatsApp.Templates- message templatesKapsoEx.WhatsApp.TemplateComponents- build template parametersKapsoEx.WhatsApp.Media- upload, inspect, delete and download mediaKapsoEx.WhatsApp.Conversations- stored conversations and thread controlKapsoEx.WhatsApp.Contacts- stored contactsKapsoEx.WhatsApp.Calls- WhatsApp CallingKapsoEx.WhatsApp.Flows- WhatsApp Flows (Meta Graph style)KapsoEx.WhatsApp.PhoneNumbers- phone number details and settingsKapsoEx.WhatsApp.BusinessProfile- business profileKapsoEx.WhatsApp.BlockUsers- block and unblock usersKapsoEx.WhatsApp.Usernames- business usernamesKapsoEx.WhatsApp.ConversionEvents- Conversions API datasets and events
Summary
Functions
Builds a value for the fields query param that selects Kapso extension
fields.
Functions
Builds a value for the fields query param that selects Kapso extension
fields.
Examples
iex> KapsoEx.WhatsApp.kapso_fields()
"kapso(default)"
iex> KapsoEx.WhatsApp.kapso_fields([:media_url, :flow_response])
"kapso(media_url,flow_response)"
iex> KapsoEx.WhatsApp.kapso_fields([])
"kapso()"Pass it to any list or get function:
KapsoEx.WhatsApp.Messages.list(client, phone_number_id, fields: KapsoEx.WhatsApp.kapso_fields([:media_url]))