Button with link

The structure presented is as follows:

function LinkButton(number, headerText, bodyText, footerText, buttonName, url){
    const data = JSON.stringify({
        "messaging_product": "whatsapp",
        "recipient_type": "individual",
        "to": number,
        "type": "interactive",
        "interactive": {
          "type": "cta_url",
      
          /* Header optional */
          "header": {
            "type": "text",
            "text": headerText
          },
      
          /* Body optional */
          "body": {
            "text": bodyText
          },
      
          /* Footer optional */
          "footer": {
            "text": footerText
          },
          "action": {
            "name": "cta_url",
            "parameters": {
              "display_text": buttonName,
              "url": url
            }
          }
        }
    });
    return data;
}

The parameters received are a number, headerText, bodyText, footerText, buttonNames and url.

We recommend sending in the following way in the process files:

Later in whatsappModels we can configure it:

Only 1 url link allowed

Última actualización