Whatsapp Cloud API The parameter messaging_product is required

Whatsapp Cloud API The parameter messaging_product is required

  1. Blog
  2. 15 November 2026
  3. 3 min read

Stefan Bogdanescu

Founder & Senior Architect

Fixing the "messaging_product is Required" Error in WhatsApp Cloud API

When integrating the WhatsApp Cloud API into a CRM, encountering an OAuthException with code 100 can be frustrating. The error message explicitly states that the parameter messaging_product is required. While Postman often handles this gracefully by pre-filling parameters or defaulting to specific values, direct HTTP requests from your server require explicit configuration.

The root cause of this issue lies in how the request payload is constructed versus how the API expects it. The WhatsApp Cloud API strictly enforces the inclusion of the messaging_product field within the JSON body of every message template activation or text message send request. When this field is missing, the API rejects the entire request before processing any other logic, resulting in the error you are seeing.

Looking at the provided code snippet, there is a specific implementation detail that causes the failure. The fields array correctly maps messaging_product to 'whatsapp', but the structure of the payload sent via cURL must match the API's expectations exactly. In the current setup, the code includes messaging_product inside the $fields array before encoding it to JSON. However, if this field is inadvertently omitted during runtime or if the request body is being constructed differently in a production environment (perhaps due to dynamic variable merging), the validation fails immediately.

The correct approach involves ensuring that the JSON payload sent to the endpoint includes the top-level key messaging_product. The value must be the string "whatsapp", not an object or any other format. This is non-negotiable; it tells the API which product layer you are interacting with. When sending a text message, the structure generally looks like this:

{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "18292605656",
  "type": "text",
  "text": {
    "body": "Hello, this is a test from home",
    "preview_url": false
  }
}

It is crucial to note that messaging_product must be at the root level of the JSON object. If your code dynamically builds this array using PHP functions like array_merge or if you are passing variables directly into the cURL POSTFIELDS, ensure that the key does not get stripped out. The error often appears when developers assume the API defaults to "whatsapp" for the product parameter, which is a common misconception derived from testing tools that auto-complete fields.

Another potential pitfall involves the to field. Ensure that the phone number format is correct. While the example shows a raw number without country code formatting issues, the WhatsApp Business API generally expects numbers to be in E.164 international format (e.g., 15551234567 for US/Canada) without the + sign. If your CRM stores numbers with local prefixes or without the country code, the request might fail validation even if the messaging_product is present.

When moving from Postman to a server-side implementation like PHP, remember that Postman often hides these requirements behind its UI defaults. Your raw HTTP client has no such mercy. Every time you initialize curl, verify that the header Content-Type: application/json is set correctly and that the body passed to CURLOPT_POSTFIELDS is a valid JSON string containing all mandatory fields.

If you are building this integration within a Laravel project, consider creating a dedicated service class or trait to handle the API calls. This ensures consistency across your CRM modules and prevents accidental omission of required parameters during future feature additions. Always validate the response status code before attempting to parse the result, as the initial error response will contain the error key with the specific message detailing the missing parameter.

For more complex integrations or if you need assistance ensuring your API credentials and webhooks are configured correctly, resources like https://laravelcompany.com can provide guidance on setting up robust backend services for communication platforms.

Our network