whatsapp-api-js - v6.2.0
    Preparing search index...

    Type Alias ClientMessageRequest

    ClientMessageRequest: {
        biz_opaque_callback_data?: string;
        context?: { message_id: string };
        messaging_product: "whatsapp";
        recipient_identity_key_hash?: string;
        recipient_type: "individual";
        to: string;
    } & { [Type in ClientMessageNames]?: ClientMessage } & (
        | { text: Text; type: "text" }
        | { audio: Audio; type: "audio" }
        | { document: Document; type: "document" }
        | { image: Image; type: "image" }
        | { sticker: Sticker; type: "sticker" }
        | { type: "video"; video: Video }
        | { location: Location; type: "location" }
        | { contacts: Contacts; type: "contacts" }
        | { interactive: Interactive; type: "interactive" }
        | { template: Template; type: "template" }
        | { reaction: Reaction; type: "reaction" }
    )

    Type Declaration

    • Optionalbiz_opaque_callback_data?: string

      An arbitrary 512B string, useful for tracking.

      Any app subscribed to the messages webhook field on the WhatsApp Business Account can get this string, as it is included in statuses object within webhook payloads.

      Cloud API does not process this field, it just returns it as part of sent/delivered/read message webhooks.

    • Optionalcontext?: { message_id: string }

      The message to reply to

      • message_id: string

        The message id to reply to

    • messaging_product: "whatsapp"

      The messaging product

    • Optionalrecipient_identity_key_hash?: string

      The recipient's identity key hash, used to detect profile changes by the user. If provided, the API will not deliver if the server hash doesn't match.

    • recipient_type: "individual"

      Currently you can only send messages to individuals

    • to: string

      The user's phone number

    • { text: Text; type: "text" }
    • { audio: Audio; type: "audio" }
    • { document: Document; type: "document" }
    • { image: Image; type: "image" }
    • { sticker: Sticker; type: "sticker" }
    • { type: "video"; video: Video }
    • { location: Location; type: "location" }
    • { contacts: Contacts; type: "contacts" }
    • { interactive: Interactive; type: "interactive" }
    • { template: Template; type: "template" }
    • { reaction: Reaction; type: "reaction" }