Guides
WhatsApp Cloud API Setup Guide: From Meta App to First Message
A developer's walk-through of Meta's real setup flow — test number, temporary and permanent tokens, the two IDs everyone mixes up, a first curl request and moving to your own number.
By the wbm.link teamUpdated 14 September 2026 8 min read
The WhatsApp Cloud API is Meta's hosted version of the WhatsApp Business Platform: you send an HTTPS request to the Graph API, and Meta delivers the message. There is no server of Meta's to install and no container to run. What trips developers up is not the API itself but the setup around it — the app, the business portfolio, the test number, the tokens and two different IDs. This guide follows Meta's own flow in the order you will meet it, as of September 2026.
WhatsApp Business API setup guide for developers: what you need
- A Facebook account you can log in to Meta for Developers with, registered as a developer.
- A business portfolio (formerly Business Manager). The app and the WhatsApp Business Account will belong to it. You can create one during setup.
- A WhatsApp number to test with — your own phone is fine. It receives the test messages.
- Somewhere to run requests — a terminal with curl is enough for this guide. A public HTTPS URL is needed later for webhooks.
- For going live: a phone number you own that can receive an SMS or voice call, is not a short code, and is not currently active on the WhatsApp app (or that you are ready to move).
Step 1: Create a Meta app with the WhatsApp use case
- Go to Meta for Developers and choose Create app.
- Pick the use case Connect with customers through WhatsApp. Older tutorials tell you to choose the “Business” app type; Meta's current dashboard asks for a use case instead, and this is the one that adds the WhatsApp product.
- Give the app a name and contact email, and connect it to your business portfolio (or create one).
- Open the app's WhatsApp section and go to API Setup.
When you complete this, Meta automatically creates a test WhatsApp Business Account and a test business phone number, already registered and ready to send. You have not bought or verified anything yet.
The WhatsApp Business API sandbox testing environment
Meta does not call it a sandbox, but the test WABA and test number are exactly that: a place to send real messages to real phones without a payment method, business verification or your own number. Here is what the testing environment gives you and where it stops.
| Test number (from API Setup) | Your own registered number | |
|---|---|---|
| Who you can message | Only recipient numbers you add in API Setup — up to five | Any WhatsApp user, within your messaging limit |
| Setup needed | None — created with the app | Ownership check by SMS or voice, display name, two-step PIN |
| Templates | The pre-approved hello_world template | Your own templates, after Meta approves them |
| Payment method | Not required to send | Required for charged messages |
| Good for | Building and testing your integration | Production traffic |
To add a recipient, open the To field in API Setup, add your WhatsApp number and confirm it with the code WhatsApp sends to that phone. Repeat for teammates' numbers. Test messages go only to numbers on that list — anything else is rejected.
WhatsApp Business API phone number ID vs WABA ID
API Setup shows two long numbers. Almost every “invalid parameter” error in a first integration comes from using one where the other belongs.
| Phone Number ID | WhatsApp Business Account ID (WABA ID) | |
|---|---|---|
| What it identifies | One business phone number on the platform | The business account that holds your numbers and templates |
| Is it the phone number? | No — an internal ID, not the digits customers see | No |
| Used for | Sending messages, uploading media, registering the number | Creating and listing templates, listing phone numbers, subscribing your app to webhooks |
| Typical endpoints | POST /PHONE_NUMBER_ID/messages, POST /PHONE_NUMBER_ID/register | /WABA_ID/message_templates, /WABA_ID/phone_numbers, /WABA_ID/subscribed_apps |
| How many | One per number — a WABA can have several | One per WABA; a WABA belongs to one business portfolio |
A useful rule: messages go through the phone number, management goes through the account. In webhooks you will see both — the entry id is the WABA ID, and metadata.phone_number_id tells you which of your numbers received the message.
WhatsApp Business API access token generation
Every request carries an access token in the Authorization header. Meta documents three kinds for WhatsApp, and which one you use depends on how far along you are.
| Token | Where it comes from | Lifetime | Use it for |
|---|---|---|---|
| Temporary (user) access token | Generate access token button in API Setup | Expires quickly — Meta's developer blog says in less than 24 hours | Your first test calls |
| System user access token | Business settings → System users | Long-lived | Your own production server |
| Business integration system user token | Embedded Signup, per onboarded customer | Scoped to that customer's assets | Tech Providers serving other businesses |
Generating a permanent system user token
- In your business portfolio settings, open System users and add a system user.
- Choose Assign assets and give it access to your app and your WhatsApp Business Account.
- Click Generate token, select your app, and tick the whatsapp_business_messaging and whatsapp_business_management permissions.
- Copy the token once and store it as a secret — an environment variable or a secrets manager, never in front-end code or a public repository.
Step 2: Send your first template message
With the temporary token, the test number's Phone Number ID and a recipient you added, send the pre-approved hello_world template. Replace the three placeholders and run:
curl -X POST "https://graph.facebook.com/v26.0/PHONE_NUMBER_ID/messages" -H "Authorization: Bearer ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"messaging_product":"whatsapp","to":"91XXXXXXXXXX","type":"template","template":{"name":"hello_world","language":{"code":"en_US"}}}'
The to number is in international format with the country code and no plus sign or spaces. A successful response returns a messages array with an id beginning wamid. — that is the message ID you will later see in delivery status webhooks. The message should arrive on the phone within seconds.
Why a template? A business can send free-form text only inside the 24-hour customer-service window that opens when the user messages you. Reply to the hello_world message from your phone, and you can then send a plain text message with type text and a text.body field. Our guide to WhatsApp message templates covers categories and approval.
Step 3: Receive messages with a webhook
Sending is only half an integration. Incoming messages and delivery statuses arrive as webhooks: Meta sends a GET request to verify your URL, then POST requests with JSON for each event. In the app's WhatsApp Configuration page, enter your HTTPS callback URL and a verify token of your choosing, then subscribe to the messages field. The WhatsApp Cloud API developer guide shows the verification handshake, the payload structure and signature checks.
Step 4: Add your own business phone number
When the integration works on the test number, add the real one — in API Setup (Add phone number) or in WhatsApp Manager.
- Check the number qualifies. It must be owned by you, have a country and area code (short codes are not supported) and be able to receive an SMS or voice call.
- Free it from the WhatsApp app if needed. A number active on WhatsApp Messenger has to be deleted from the app first. A number on the WhatsApp Business app can instead be connected through Meta's coexistence flow by providers that support it — see WhatsApp coexistence.
- Enter a display name that matches your business. Meta reviews it.
- Verify ownership with the code Meta sends by SMS or voice call.
- Register the number for Cloud API with POST /PHONE_NUMBER_ID/register, sending messaging_product whatsapp and a six-digit two-step verification pin. Adding the number in the dashboard does not complete this step on its own.
Step 5: Go live
- Add a payment method to the WhatsApp Business Account, so charged messages can be sent.
- Swap the temporary token for your system user token in your server configuration.
- Create your own templates through the Message Templates API or WhatsApp Manager and wait for approval.
- Complete business verification in your business portfolio. New portfolios start at a messaging limit of 250 unique customers in a rolling 24 hours; verification is one way to reach 2,000, after which the limit rises automatically through 10,000, 100,000 and unlimited as quality allows.
- Set up your business profile — description, address, website and profile picture.
- Point your production webhook at a server that answers quickly and handles retries without processing the same message twice.
For what each message costs once you are live, read WhatsApp Business API pricing in India.
When you would rather not build it yourself
The Cloud API gives you the pipe, not the product. A support team still needs a shared inbox, assignment, templates that non-developers can write, broadcasts to customer lists, and a chatbot — and someone has to build, host and maintain all of it. That is worth doing if WhatsApp is part of your own software.
If what you need is for your team to use WhatsApp, wbm.link is a no-code panel on the WhatsApp Business Platform: a shared team inbox, a template builder that submits to Meta, broadcasts to labels or CSV contacts, keyword auto-replies, a flow chatbot, an AI assistant and short links. It costs ₹999 per connected number per month with unlimited team members. It does not offer a public API or webhooks of its own — it is the option for teams who do not want to write code at all.
Skip the setup, keep the platform
Connect your number to wbm.link and give your whole team a WhatsApp inbox, templates and broadcasts — no tokens, no webhooks, no server.
Start with wbm.link