5: The example app
The phlo-demo-whatsapp repository is a single app that shows both directions and ships with no secrets.
5.1: What it does
- Send panels for text, image, poll and location, each one route calling one
WhatsAppmethod. - A status check that asks the gateway whether it is online.
- A
/receivewebhook that logs inbound messages into an Inbox.
Without credentials it is completely inert: the page says "Not configured", the buttons explain how to set it up, and the webhook returns 401. Add a data/creds.ini pointing at your own gateway and it goes live.
5.2: Running it for real
- Run a phloWA gateway linked to your own number.
- Copy
data/creds.ini.exampletodata/creds.iniand fill in the gateway URL and secret. - Set the gateway's inbound webhook to
https://your-host/receivewith the same secret.
The repository is the reference for the shielding pattern: read its .gitignore and creds.ini.example before you build your own.