1: phloWA overview

phloWA is the WhatsApp layer of the Phlo platform. It lets a Phlo app send and receive WhatsApp messages through a small gateway, while your application code stays ordinary Phlo: a route to receive, the WhatsApp resource to send.

1.1: The gateway model

phloWA runs a gateway process (built on whatsapp-web.js) for each WhatsApp number. The gateway owns the connection to WhatsApp and exposes a small, secret-gated HTTP API on localhost. Your Phlo app never talks to WhatsApp directly; it talks to the gateway.

This split keeps the long-lived, stateful WhatsApp session out of your request cycle. Your app stays stateless and short-lived; the gateway holds the session.

1.2: The two directions

Direction You write Carries
Receive a POST route, secret-checked inbound messages
Send %WhatsApp(url, secret)->... text, media, polls, locations

1.3: What you wire

The phlo-demo-whatsapp repository is a complete, credential-shielded reference for both directions. With no credentials it stays inert, so it is safe to run anywhere.

我们使用必要的cookie来使该网站正常工作。在您的许可下,我们还使用分析工具来改善网站。