Skip to main content

WhatsApp

This is a shipped runtime-backed surface: direct sends are implemented, the serve loop is implemented, and the channel can join multi-channel-serve or gateway run.

At A Glance

FieldValue
Catalog idwhatsapp
Config keywhatsapp
Implementation statusruntime_backed
Transportwhatsapp_cloud_api
Aliaseswa, whatsapp-cloud
Default send target kindaddress

Minimal Config

[whatsapp]
enabled = true
webhook_bind = "127.0.0.1:8080"
webhook_path = "/whatsapp/webhook"
access_token_env = "WHATSAPP_ACCESS_TOKEN"
phone_number_id_env = "WHATSAPP_PHONE_NUMBER_ID"
verify_token_env = "WHATSAPP_VERIFY_TOKEN"
app_secret_env = "WHATSAPP_APP_SECRET"

Smoke Test

loong whatsapp-send --target "+15551234567" --text "hello from loong"
loong whatsapp-serve

Command Surface

OperationCommandUsage or status
business sendwhatsapp-sendUsage: loong whatsapp-send [OPTIONS] —target <TARGET> —text <TEXT>
cloud webhook servicewhatsapp-serveUsage: loong whatsapp-serve [OPTIONS]

Required Fields For Send

RequirementConfig pathsEnv pointer pathsDefault env
channel enabledwhatsapp.enabled
whatsapp.accounts.<account>.enabled
nonenone
cloud api access tokenwhatsapp.access_token
whatsapp.accounts.<account>.access_token
whatsapp.access_token_env
whatsapp.accounts.<account>.access_token_env
WHATSAPP_ACCESS_TOKEN
phone number idwhatsapp.phone_number_id
whatsapp.accounts.<account>.phone_number_id
whatsapp.phone_number_id_env
whatsapp.accounts.<account>.phone_number_id_env
WHATSAPP_PHONE_NUMBER_ID

Required Fields For Serve

RequirementConfig pathsEnv pointer pathsDefault env
channel enabledwhatsapp.enabled
whatsapp.accounts.<account>.enabled
nonenone
cloud api access tokenwhatsapp.access_token
whatsapp.accounts.<account>.access_token
whatsapp.access_token_env
whatsapp.accounts.<account>.access_token_env
WHATSAPP_ACCESS_TOKEN
phone number idwhatsapp.phone_number_id
whatsapp.accounts.<account>.phone_number_id
whatsapp.phone_number_id_env
whatsapp.accounts.<account>.phone_number_id_env
WHATSAPP_PHONE_NUMBER_ID
webhook verify tokenwhatsapp.verify_token
whatsapp.accounts.<account>.verify_token
whatsapp.verify_token_env
whatsapp.accounts.<account>.verify_token_env
WHATSAPP_VERIFY_TOKEN
meta app secretwhatsapp.app_secret
whatsapp.accounts.<account>.app_secret
whatsapp.app_secret_env
whatsapp.accounts.<account>.app_secret_env
WHATSAPP_APP_SECRET

Gateway And Ownership

This surface can run directly through its own *-serve command, or under Gateway And Supervision through multi-channel-serve and gateway run.

Operator Notes

  • WhatsApp is currently a real runtime-backed surface: outbound sends are shipped and the webhook reply service is also implemented.
  • Serve mode needs verify_token and app_secret in addition to the Cloud API access token and phone number id.