Skip to content

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 doesRoute
Meta’s check of the hookGET /public/v1/apps/{key}/channels/{channel}
Messages on SMS or WhatsApp, for one appPOST /public/v1/apps/{key}/channels/{channel}

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

NameInDescription
key (required)pathThe app’s public key (app_…).
channel (required)path

Answers

StatusBodyMeaning
200text/plainOK
401problemNo credential, or one that is not right.

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

NameInDescription
key (required)pathThe app’s public key (app_…).
channel (required)path

Answers

StatusBodyMeaning
200text/xmlOK
400problemThe request could not be read: the problem names the field.
401problemNo credential, or one that is not right.
404problemNot found, or the part is switched off.
413problemToo large.
429problemToo many requests: wait for Retry-After.
503problemNot set up here yet.