Function sendTextMessage

  • Send a text message

    Parameters

    Returns Promise<SendMessageReturn>

    WPP.chat.sendTextMessage('[number]@c.us', 'Hello new contact', {
    createChat: true
    });

    // With Buttons
    // Attention: The buttons are an alternative solution we found to make it work. There is no guarantee that they will continue functioning, or when they might stop: The only certainty is: They will stop, so use them responsibly.
    WPP.chat.sendTextMessage('[number]@c.us', 'Hello', {
    useInteractiveMessage: true, // False for legacy
    buttons: [
    {
    url: 'https://wppconnect.io/',
    text: 'WPPConnect Site'
    },
    {
    phoneNumber: '+55 11 22334455',
    text: 'Call me'
    },
    {
    id: 'your custom id 1',
    text: 'Some text'
    },
    {
    code: '789890',
    text: 'Another text'
    }
    ],
    title: 'Title text', // Optional
    footer: 'Footer text' // Optional
    });