Sending Whatsapp Template With a Document Header via node.js
I am trying to send a WhatsApp template message using Postman. I am receiving a successful response with a WhatsApp ID, but the message is not being received by the recipient (which is myself for testing purposes).
Here are the details of my request:
- Method: POST
- URL: [Your WhatsApp API endpoint]
- Headers:
- Authorization: [Your authorization token]
- Content-Type: application/json
- Body:
{ "to": "recipient_number", "template": { "name": "your_template_name", "language": { "code": "en", "policy": "deterministic" }, "components": [ { "type": "BODY", "text": "Hello, this is a test message." } ] } }
I have checked the following:
- The recipient number is correct and includes the country code.
- The template message format complies with WhatsApp's guidelines.
- I am using a WhatsApp Business Account and have the necessary permissions.
- The template has been approved by WhatsApp.
- The API endpoint and request format are correct.
Despite these checks, the message is not being delivered. I would appreciate any insights.
You can use this tool webhook.site to check the error of failure.
How to use it.
Set your webhook URL as you'll get from the tool. Send template message. You'll receive the error message with status code. Check the status code here WhatsApp Cloud API Error code Onpremise API Error CodeMy guess is that you might have not attached payment method to you business manager for the failure.