Meta App Setup for the WhatsApp Cloud API, Step by Step
Create the Meta app, connect a Messaging account, pick permissions and subscribe to the webhook fields that tell you when numbers, names and templates change.
The Meta app is the object that holds your credentials, your permissions and your webhook subscription. It is created once, but its settings decide whether messages arrive, which events you receive and whether your token works outside the developer account. This article walks through the setup in the order Meta's own guide uses, then covers the part most tutorials skip: which webhook fields to subscribe to and what each one is for.
Creating the app
Create the app in the Meta App Dashboard by clicking Create App, entering an app name and email, selecting the use case Connect with customers through WhatsApp and choosing a business portfolio. Meta's get-started guide lists the prerequisites: a Facebook account or managed Meta account, a developer registration if you have not done one, and a WhatsApp-enabled device to send and receive test messages.
After creation you land on Customize use case, then Connect on WhatsApp, then Quickstart. Click Start using the API to reach the API Setup page. There you connect a Messaging account by selecting an existing one or creating one. Save the Messaging account ID that the panel displays; it is the identifier for templates and webhook subscriptions, as the IDs article of this series explains.
The portfolio you select here matters, since the accounts created belong to it and Meta states that a Messaging account cannot be migrated to another business. If the business already has a portfolio, use it, and read the portfolio article before you create a second one.
The first message and the 24-hour window
In API Setup, click Generate access token, choose a From number (or add one), enter a To number and click Send message. Keep the test phone number ID and the Messaging account ID. When the recipient replies, a 24-hour customer service window opens, which is what allows non-template messages to that person.
The token in this panel is temporary. Meta's guide moves on to a permanent token for the next step: create a system user in Business Settings, assign the app with Manage app and the WhatsApp account with Full control, and generate a token with business_management, whatsapp_business_messaging and whatsapp_business_management. A non-template text message can then be sent with the system user token to the messages endpoint of the test phone number ID, and the receipt shows up in your webhook.
The credentials article in this series explains the token types, and the quickstart walks through the first send.
Permissions the app needs
Two permissions cover almost everything: whatsapp_business_messaging for messaging and phone number settings, and whatsapp_business_management for account settings, Messaging accounts and templates. For webhooks, Meta states that whatsapp_business_messaging is required for the messages and calls fields, while whatsapp_business_management is required for all the others.
Direct developers grant these through the system user when generating a token. Partners need Advanced access, approved through App Review, before customers can grant them during onboarding. Until review, the permissions appear only to users with admin, developer or tester roles on the app. If your app serves other businesses, plan the review time into your schedule.
Webhook fields: what to subscribe to
Subscribe in the App Dashboard under WhatsApp, Configuration, or under Use cases, Customize, Configuration if you used the Connect with customers through WhatsApp use case. The list of fields is longer than most integrations need, so start with the ones that report state changes you would otherwise discover by accident.
| Field | What it reports | Why a developer cares |
|---|---|---|
| messages | Incoming messages and outgoing message statuses | The core of any integration |
| message_template_status_update | Template approval state changes | A template can stop being usable |
| message_template_quality_update | Template quality changes | Quality affects sending |
| phone_number_name_update | Display name review result | Tells you when a name is approved or rejected |
| phone_number_quality_update | Number quality changes | Reputation signal for a number |
| business_capability_update | Capability and limit changes | Reports increases in limits and number caps |
| account_update | Account-level changes | Includes removal notices for a Messaging account |
| account_alerts | Alerts about the account | Reports limit denials with an alert_type |
Other fields in Meta's list include calls, history, security, user_preferences, template_category_update and smb_message_echoes. Add them when the feature they describe is in scope. A small, deliberate subscription is easier to monitor than every field enabled by default.
Keep the app in Live mode when you need real events. Meta's troubleshooting section says that some webhooks are not sent in Dev mode, so a staging app that never receives a field may simply be in the wrong mode.
Delivery facts worth designing around
Webhook payloads can be up to 3 MB, Meta retries failed deliveries for up to 7 days when your endpoint returns a non-200 status or delivery fails, and duplicates are therefore possible. Design the handler to answer quickly and process asynchronously, and to treat repeated events as normal.
For security, Meta supports mutual TLS and recommends it over IP allowlisting, since Meta periodically changes its IP addresses. You can also send certain fields to an alternate endpoint for a Messaging account or a phone number through override callback URLs, which is useful for testing and for partners that give each customer an endpoint. The webhooks documentation covers how to receive and verify the events on your side.
Example: a minimal production subscription
A team launching a support integration subscribes to messages first and confirms that a reply from a phone arrives at its endpoint. Then it adds phone_number_name_update before the name is submitted, message_template_status_update before creating templates, and business_capability_update so the app notices when a limit or number cap changes.
The team writes one table in its runbook: field name, handler, owner and the alert it raises. When a field produces events nobody handles, they either write a handler or unsubscribe. A staging app in Dev mode and a production app in Live mode both exist, with separate callback URLs, so test traffic never reaches production data.
A go-live checklist for the app
Before the first real customer message, run through a short list. Each item is a place where integrations commonly fail silently.
- The app is in Live mode and the callback URL answers requests.
- The system user token has all three permissions and access to both accounts.
- The subscribed fields match the handlers you actually wrote.
- A test payload from the App Dashboard reaches your endpoint and is logged.
- The version in your request URLs is pinned and recorded.
Repeat the list whenever you create a new app or a new environment, since each app has its own settings and subscriptions.
Frequently asked questions
Which use case should I select when creating the Meta app?
Meta's get-started guide selects Connect with customers through WhatsApp, then the Quickstart and API Setup. Pick the business portfolio that will own the WhatsApp accounts.
Which permission do webhook fields require?
Meta says whatsapp_business_messaging is required for the messages and calls fields and whatsapp_business_management for all the other fields.
Why do I receive no webhooks from my app?
Check that the endpoint accepts requests, send a test payload from the App Dashboard, and confirm the app is in Live mode. Meta notes that some webhooks are not sent in Dev mode.
How long does Meta retry a failed webhook?
Meta retries for up to 7 days when the endpoint returns a non-200 status or delivery otherwise fails, so your handler must tolerate duplicates.
Fontes
Documentação oficial da Meta, conferida em 31 de outubro de 2026.