SendMessageWithButton

Sends a message with interactive buttons to the specified contact's phone number.

headerText: The text to be displayed in the header of the message. If null or empty, no header will be included.

footerText: The text to be displayed in the footer of the message. The text is truncated to a maximum length of 60 characters.

List<Button> buttons: A list of interactive buttons to be included in the message. Max list value is 3.

WpResponse response: An object containing the response from the messaging service.

Example usage:

List<Button> buttons = new()
{
    new() 
    {
        Reply = new Reply { Id = "button-1", Title = "First" }
    },
    new()
    {
        Reply = new Reply { Id = "button-2", Title = "Second" }
    }
};

SendMessageWithButton("message", "header", "footer", buttons);

Overloads of this function are available in BaseWhatsAppDialog class.

Last updated