Public routes: Channel hooks
Where Twilio or Meta posts the messages people send to the app’s SMS and WhatsApp numbers, signed by the provider.
| What it does | Route |
|---|---|
| Meta’s check of the hook | GET /public/v1/apps/{key}/channels/{channel} |
| Messages on SMS or WhatsApp, for one app | POST /public/v1/apps/{key}/channels/{channel} |
Meta’s check of the hook
Section titled “Meta’s check of the hook”GET /public/v1/apps/{key}/channels/{channel}
Answers hub.challenge when hub.verify_token is the app’s verify token, as Meta’s webhook set-up asks.
Needs: nothing: no credential.
Parameters
| Name | In | Description |
|---|---|---|
key (required) | path | The app’s public key (app_…). |
channel (required) | path |
Answers
| Status | Body | Meaning |
|---|---|---|
| 200 | text/plain | OK |
| 401 | problem | No credential, or one that is not right. |
Messages on SMS or WhatsApp, for one app
Section titled “Messages on SMS or WhatsApp, for one app”POST /public/v1/apps/{key}/channels/{channel}
The webhook of the provider whose account the app connected for the channel (sms or whatsapp): Twilio’s form post, signed X-Twilio-Signature with the auth token, or Meta’s JSON, signed X-Hub-Signature-256 with the app secret. Each message starts or continues a conversation with the contact who has the number.
Needs: nothing: no credential.
Parameters
| Name | In | Description |
|---|---|---|
key (required) | path | The app’s public key (app_…). |
channel (required) | path |
Answers