Documentation
¶
Overview ¶
Package whatsapp is the gateway's WhatsApp adapter over the Meta Cloud API. Like GitHub it receives inbound messages by webhook (a GET verification handshake plus POSTed message events) and, unlike GitHub, can reply — so it exposes Send, posting through the Graph API. It stays INERT until the Meta business is verified: the gateway only mounts it when whatsapp.active is set in gateway.yaml (see internal/gateway/config), because Meta verification is an external account state the code can't observe. The user stores the access and verify tokens in the global .env (WHATSAPP_ACCESS_TOKEN, WHATSAPP_VERIFY_TOKEN); the phone number id is a non-secret setting.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
Channel is a WhatsApp Cloud API connection.
func New ¶
New builds a WhatsApp channel from the phone number id and its tokens. appSecret is the Meta app secret used to verify inbound message signatures; it must be non-empty for the handler to accept POSTed messages.