IncomingMessage
IncomingMessage =
TextIncomingMessage|ImageIncomingMessage|VideoIncomingMessage|AudioIncomingMessage|DocumentIncomingMessage|StickerIncomingMessage|LocationIncomingMessage|ContactsIncomingMessage|InteractiveIncomingMessage|ButtonIncomingMessage|ReactionIncomingMessage|SystemIncomingMessage|OrderIncomingMessage|UnsupportedIncomingMessage|EditIncomingMessage|RevokeIncomingMessage
Defined in: src/types/webhooks.ts:387
Discriminated union of the inbound message types this SDK models, keyed on
type. Narrowing on a literal type (via switch or if) selects the
matching variant.
Meta may introduce new message types; those still parse at runtime and are
returned by extractMessages as values whose type is none of the
known literals. Handle them in a default branch (treat as
UnknownIncomingMessage) so new types never break your handler.
Independent open-source project. Not affiliated with, endorsed by or sponsored by Meta or WhatsApp. Released under the MIT licence. Source on GitHub.