What it is
Meta’s official Cloud API — no ban risk, but Meta decides what may be sent. Proactive delivery requires an approved template.
This channel is in beta: it works, but has not yet been exercised in production by many customers. Tell us what you find.
Set up
About 20 minutes to a working channel.
- Create a Meta app with the WhatsApp use case. developers.facebook.com/apps → Create App → name and e-mail → use case “Connect with customers through WhatsApp” → pick your company’s business portfolio → Create app.
- Open API Setup and copy the Phone number ID. The app opens on Connect on WhatsApp → Quickstart. Start using the API leads to API Setup, which shows the WhatsApp Business account (create one if there is none), Meta’s test number and its Phone number ID. Generate access token gives a temporary token that expires quickly: enough for a first test, not for production.
- Add the test recipients under “To”. From Meta’s test number, only the numbers added under To in API Setup receive anything. Skipping this is the most common cause of “it says sent but nothing arrived”.
- Generate the System User token. Business Settings → System users → Add. Then Assign Assets: the app, with Manage app under Full control, and the WhatsApp account, with Manage WhatsApp Business accounts under Full control. Then Generate token with business_management, whatsapp_business_messaging and whatsapp_business_management. Copy it right away; this token goes in Access token.
- For production, register your company’s number. In API Setup, From → add a number. It must be yours, with country and area code, and able to receive an SMS or call for the code. A number already on the WhatsApp or WhatsApp Business phone app must be deleted there first. Meta asks for a display name, which it reviews, and a two-step verification PIN, then registers the number with a call to its register endpoint (without it, sends fail with 133010; the command is on the WhatsApp page of the docs). Add a payment method to the WhatsApp Business account: Meta bills your company for each delivered template. Then put the new number’s Phone number ID in this channel.
- Create a Utility template and get it approved. WhatsApp Manager → Message templates → Create template, category Utility. Meta rejects a body that starts or ends with a variable, and treats a body that is only {{1}} as Marketing: write fixed text around it, e.g. “DataRunner alert: {{1}}. Details in the console.” An alert fills only {{message}}, so the alert template has one variable. To attach the report file, also declare a DOCUMENT header. Approval takes minutes to hours.
- Fill the fields here, then Test. Test validates the token and the phone number id against the Graph API without sending a message. The real send happens when a report runs or an alert fires.
Fields
| Field | Required | What it is |
|---|---|---|
| Phone Number ID | Yes | Meta app → WhatsApp → API Setup. It is a number id, not the phone number itself. (1234567890) |
| Access token | Yes | Temporary token from API Setup for a first test (it expires quickly), or the System User token for production. |
| API version | No | Graph API version. Blank uses v25.0. Meta retires each version about two years after release. (v25.0) |
| Approved template | No | Required for proactive sends, created in the Utility category. How many parameters the body declares is up to you — the field below says what fills each. A DOCUMENT header is needed when the report produces a file (CSV/XLSX/PDF), and unnecessary when it is Inline HTML. Empty means free-form text, which Meta delivers only inside the 24h window. (report_ready) |
| Template language | No | Meta language code of the approved template, e.g. pt_BR or en_US. A mismatch here comes back as “template not found”, which points at the name and not the language. Left blank it falls back to en_US. (pt_BR) |
| Template parameters | No | One line per body parameter of the approved template: line 1 fills {{1}}, line 2 fills {{2}}, and so on. Use {{message}} for the report copy, plus any report placeholder — {{report_name}}, {{rows}}, {{result_summary}}, {{date}}. Meta refuses the send when the count differs from what the template declares (error 132000). Left blank it sends one parameter carrying the whole message, which is right for a template with a single variable, like the alert one; a single - means the template takes no parameters at all, which is right for one whose body is fixed text. ({{message}}) |
What goes in Target
The recipient phone in international format, digits only: 5511999999999. No plus sign, spaces or dashes — anything else is stripped before the call.
Target is required for this channel: a route without one never leaves. — 5511999999999
The account is your company’s
DataRunner sends through Meta’s official API, with your company’s app, WhatsApp Business account and number. Recipients see your company’s name, and Meta bills each send to you directly. DataRunner charges nothing per message and does not receive replies.
A channel holds one number and one default template. A report can swap the template in its own copy; alerts always use the channel’s template.
Example templates
Outside the 24 hours after the person last wrote to your number, Meta only delivers approved templates. Create them in WhatsApp Manager, category Utility, in the language you put in Template language (en_US for English).
- The body cannot start or end with a variable. Write fixed text before and after.
- Meta treats a body that is only {{1}} as Marketing, which costs more and is not meant for notices.
- Variables in sequence: {{1}}, {{2}}, {{3}}, with no gaps.
- Promotional content in a Utility template makes Meta move it to Marketing. Meta warns by e-mail and in WhatsApp Manager.
| For | Template body at Meta | Template parameters on the channel |
|---|---|---|
| Alert | DataRunner alert: {{1}}. Details in the console. | blank |
| Report with a file (DOCUMENT header) | Here is the {{1}} report for {{2}}, generated by DataRunner. | {{report_name}} on line 1, {{date}} on line 2 |
| Text-only report | Summary of {{1}}: {{2}}. Sent by DataRunner. | {{report_name}} on line 1, {{message}} on line 2 |
An alert fills only {{message}}. On a channel whose parameters mention {{report_name}} or {{date}}, the alert goes out with the placeholder written in it. Create a channel just for alerts, with the same credentials and the alert template.
Meta does not accept line breaks, tabs or more than four spaces in a row inside a variable. DataRunner joins the message lines into one, separated by dashes, and cuts it at 900 characters.
From the test number to production
Meta’s test number is for checking the channel. To notify real people, use your company’s number.
- In the app’s API Setup, under From, add the number. It must be yours, with country and area code, and able to receive an SMS or call for the verification code. If it is on the WhatsApp or WhatsApp Business phone app, delete that account first.
- Enter the display name, which Meta reviews, and set the two-step verification PIN. Keep the PIN: it is needed to change or remove the number.
- Register the number on the Cloud API. Meta notes that adding it in the dashboard is not enough; without registering, sends come back with error 133010. Run the command below once, with the new Phone number ID, the System User token and the PIN.
- Add a payment method to the WhatsApp Business account. Without one, sends come back with error 131042.
- Replace the channel’s Phone number ID with the new number’s, click Test, and do a real send through the alert route.
curl -X POST "https://graph.facebook.com/v25.0/PHONE_NUMBER_ID/register" \
-H "Authorization: Bearer SYSTEM_USER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"messaging_product":"whatsapp","pin":"123456"}'Outside the 24-hour window, a new portfolio reaches up to 250 different people per rolling 24 hours, across all its numbers. Verifying the business with Meta opens the path to 2,000, and from there the limit rises on its own with quality and use. The current limit is in WhatsApp Manager, under Account tools → Messaging limits.
Cost
Meta charges per delivered template, priced by country and category. Utility costs less than Marketing and is the right category for reports and alerts. The charge goes to the payment method on your company’s WhatsApp Business account.
Errors Meta returns
Meta’s error shows on the report run and on Send for real in the alert routes. On a real alert it does not show in the console yet: test the route before depending on it.
| Code | What Meta says | What to do |
|---|---|---|
| 190 | The access token has expired. | Generate the System User token and paste it in Access token. The temporary token from API Setup expires quickly. |
| 133010 | Number not registered on the platform. | Register the number with the command in the section above. |
| 132001 | The template does not exist in that language or was not approved. | Check the template name and Template language (pt_BR, en_US) on the channel. |
| 132000 | The parameter count differs from the template’s. | One line per template variable in Template parameters. |
| 132015 | Template paused for low quality. | Revise the text in WhatsApp Manager or create another template. |
| 131047 | More than 24 hours since the person last replied. | Fill Approved template: free-form text is only delivered inside the window. |
| 131026 | Unable to deliver. | The recipient has no WhatsApp, has not accepted the latest terms, or runs an outdated app. Check the number in Target. |
| 131042 | Payment method problem. | Review the payment on the WhatsApp Business account. |
| 131048 | The number’s sending limit was reached. | Wait and lower the volume. See the limit under Account tools → Messaging limits. |
Test
Every channel has a Test button in the channel list (Settings → Channels). The result is kept (date, status and the provider's error when there was one), and a channel that was never tested is marked in the list.
Test validates the access token and the phone number id against Meta without sending a message. To prove the template, create the alert route with this channel and use Send for real under Alerts → Alert routes → Test the routes: an alert marked as a test arrives and, if Meta refuses it, Meta’s error shows there.
Check it end to end
- Report: open a report, add this channel under Destinations (with the Target when the channel needs one), click Run now and open the run. The log says which channel each recipient went through and what the provider answered.
- Alert: under Alerts → Alert routes, create a route with this channel as an escalation step. Routes match on severity and source; the first match wins.
- To fire an alert without breaking anything: use a test database you can switch off, and create a database monitor pointing at it, on a short interval. When it goes down the alert leaves through the route; delete the monitor afterwards. The message carries an acknowledge link; click it and the escalation stops.
- Report rules (new rows, value out of range) arrive through the same route, with source "report rule".
What most often goes wrong
Outside the 24h customer-service window Meta only delivers approved templates. With Approved template empty a report goes out as free-form text, which means it reaches almost nobody and reports no error. It is Meta’s rule, not a DataRunner bug. An alert fills only {{message}}: any other placeholder in Template parameters goes out literally, so give alerts a channel of their own, with the same credentials and the alert template.