Skip to main content

handle_inbound

Function handle_inbound 

Source
pub async fn handle_inbound(
    headers: HeaderMap,
    body: Bytes,
) -> impl IntoResponse
Expand description

POST /webhook/whatsapp — inbound message delivery.

Body MUST be read as raw bytes (Bytes, not Json<T>) so the exact signed payload is available for the HMAC check before any deserialization happens (spec §3.2/§9.1) — deserializing first and re-serializing to check the signature would validate a re-encoded payload, not what Meta actually signed.