Resolving the WhatsApp Template Error: "body: Parameter at index contains URL"

Understanding the Error

This error occurs when you attempt to send a WhatsApp message where a URL has been placed inside a dynamic variable (like {{1}}) in the message body. The underlying issue is a policy enforced by the messaging platform (Meta) to prevent phishing and maintain message quality. When your template was originally approved, it was validated with the understanding that the variables in the body would contain standard text like names or dates, not website addresses. Inserting a full URL into a variable at the moment of sending violates this approval.

Why Does This Happen?

You will typically encounter this error if you are programmatically passing a complete web address (e.g., https://yourwebsite.com/deal/456) into a body parameter. This is not permitted, even if you use a URL shortener, as many shortened links are also blocked. The approved structure of your template and the content you are sending do not match.

How to Fix the Error

You can resolve this issue by using one of the following two methods. Choose the option that best fits your use case.

If the link you want to share is the same for every recipient, the simplest solution is to include the full, static URL directly within the approved text of your template.

  • Create or modify your WhatsApp template so that the web address is written out plainly, not inside a variable.
  • Example Template Body: "Hello {{1}}, please find your document here: https://yourcompany.com/resources"

In this scenario, the variable {{1}} would contain the contact's name, while the link remains fixed and is part of the pre-approved template.

Option 2: Use a Website Call-to-Action Button

If you need to send a unique, personalized link to each contact (for example, a link containing their specific order ID), you should use a Website Button instead of a body variable.

  • Edit your WhatsApp template to include a Call-to-Action (CTA) button of the type "Visit Website".
  • In the button settings, you define a base URL (e.g., https://yourstore.com/tracking/). This base URL is approved as part of the template.
  • At the time of sending, you can then dynamically append a unique suffix (like an order number) to this base URL.

This method keeps the variable data separate from the link itself, complying with the platform's requirements while still allowing for personalization.