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

  1. Go to Meta for Developers and choose Create app.
  2. 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.
  3. Give the app a name and contact email, and connect it to your business portfolio (or create one).
  4. 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 messageOnly recipient numbers you add in API Setup — up to fiveAny WhatsApp user, within your messaging limit
Setup neededNone — created with the appOwnership check by SMS or voice, display name, two-step PIN
TemplatesThe pre-approved hello_world templateYour own templates, after Meta approves them
Payment methodNot required to sendRequired for charged messages
Good forBuilding and testing your integrationProduction 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 IDWhatsApp Business Account ID (WABA ID)
What it identifiesOne business phone number on the platformThe business account that holds your numbers and templates
Is it the phone number?No — an internal ID, not the digits customers seeNo
Used forSending messages, uploading media, registering the numberCreating and listing templates, listing phone numbers, subscribing your app to webhooks
Typical endpointsPOST /PHONE_NUMBER_ID/messages, POST /PHONE_NUMBER_ID/register/WABA_ID/message_templates, /WABA_ID/phone_numbers, /WABA_ID/subscribed_apps
How manyOne per number — a WABA can have severalOne 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.

TokenWhere it comes fromLifetimeUse it for
Temporary (user) access tokenGenerate access token button in API SetupExpires quickly — Meta's developer blog says in less than 24 hoursYour first test calls
System user access tokenBusiness settings → System usersLong-livedYour own production server
Business integration system user tokenEmbedded Signup, per onboarded customerScoped to that customer's assetsTech Providers serving other businesses

Generating a permanent system user token

  1. In your business portfolio settings, open System users and add a system user.
  2. Choose Assign assets and give it access to your app and your WhatsApp Business Account.
  3. Click Generate token, select your app, and tick the whatsapp_business_messaging and whatsapp_business_management permissions.
  4. 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.

  1. 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.
  2. 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.
  3. Enter a display name that matches your business. Meta reviews it.
  4. Verify ownership with the code Meta sends by SMS or voice call.
  5. 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

FAQ

Frequently asked questions

Something else on your mind? Ask us.

Is there a WhatsApp Business API sandbox testing environment?

Meta does not use the word sandbox, but creating an app with the WhatsApp use case gives you a test WhatsApp Business Account and a test business phone number. You can send messages from it to a small list of recipient numbers you add in API Setup, without a payment method or your own number.

What is the difference between the Phone Number ID and the WABA ID?

The Phone Number ID identifies one business phone number and is used to send messages and register the number. The WhatsApp Business Account ID identifies the account that holds your numbers and templates, and is used for template management, listing phone numbers and subscribing apps to webhooks. Neither is the phone number itself.

How long does the WhatsApp Cloud API temporary access token last?

Meta describes it as expiring quickly — its developer blog says in less than 24 hours. For anything beyond first tests, generate a system user access token with the whatsapp_business_messaging and whatsapp_business_management permissions.

How do I generate a permanent WhatsApp Business API access token?

Create a system user in your business portfolio settings, assign it your app and WhatsApp Business Account, then generate a token for your app with the whatsapp_business_messaging and whatsapp_business_management permissions. Store it as a server-side secret.

Can I use a number that is already on WhatsApp?

A number active on WhatsApp Messenger must be deleted from the app before it can be registered. A WhatsApp Business app number can be connected with Meta's coexistence feature through providers that support it, keeping the app working on the phone.

Is the WhatsApp Cloud API free to use?

Meta hosts the Cloud API, so there is no server of Meta's to run. What Meta charges for is messages: once you are live, charged message types are billed per delivered message. Testing from the test number to your recipient list does not need a payment method.

Related features

More from the blog

Put your whole team on WhatsApp today.

Create your account, connect your number with Meta's official sign-up and start replying from one shared inbox.