WhatsApp Business API Setup
A complete, click-by-click walkthrough to connect Meta's WhatsApp Cloud API to your MsgHub account. By the end of this guide your business number will be live, sending and receiving messages, with AI ready to plug in.
Overview
WhatsApp Business Cloud API is Meta's official platform for sending business messages on WhatsApp at scale. Once registered, your number can receive customer messages, send replies, run automated workflows, and trigger broadcast campaigns — all from MsgHub's inbox.
This guide walks you through the five parts of setup:
- Meta side — create a Business Manager, register a WhatsApp Business Account (WABA) and add a phone number.
- Credentials — create a Meta App, generate a permanent access token, and find your App Secret.
- MsgHub side — paste credentials into Settings.
- Webhook — point Meta at MsgHub so inbound messages arrive in your inbox.
- Test — send and receive a real message to confirm the wiring.
Who this is for: business owners and operations teams setting up WhatsApp on MsgHub for the first time. No developer needed — but if you're stuck, our team can screen-share through the whole flow with you in 15 minutes.
Prerequisites
Before you start, gather these. The whole setup gets blocked if any of them is missing.
- A registered business — sole-proprietorship, LLP, Pvt Ltd, partnership are all fine. Meta will not approve personal-name registrations for high-volume sending.
- A Meta Business Manager account — created on business.facebook.com. If you already run Facebook ads or Instagram for business, you almost certainly have one.
- A phone number not currently active on WhatsApp — neither regular WhatsApp nor WhatsApp Business app. If your number is on either, you must delete the account inside that app first and wait roughly 30 minutes. Any message history on that number will be lost.
- An admin email address for receiving Meta approval notifications.
- An active MsgHub tenant account — if you don't have one yet, request a trial.
Phone number choice matters. Pick a number you control long-term — moving a WhatsApp Business number to a different number later is technically possible but tedious. Many businesses use a dedicated SIM rather than the founder's personal mobile.
Part 1 · Set up your WhatsApp Business Account on Meta
Open or create your Meta Business Manager
Go to business.facebook.com and sign in with the Facebook account you want to use as the admin. If this is your first time, click Create Account in the top-right and complete the business profile (legal name, business email, address, country).
You will land on Business Settings — bookmark this URL. Almost every step in Part 1 happens here.
Create a WhatsApp Business Account (WABA)
Inside Business Settings, in the left sidebar:
- Click Accounts → WhatsApp Accounts.
- Click Add → Create a WhatsApp Account.
- Enter a name (this is internal — e.g. "Acme Retail WhatsApp").
- Pick the correct timezone — affects analytics and message scheduling.
- Pick currency — used for Meta's per-conversation billing.
- Click Create.
You will see a new WABA in the list. Click into it — you'll need the ID from here in a minute.
Add and verify your phone number
Still inside the WABA you just created:
- Click Phone Numbers → Add Phone Number.
- Enter the business name as it should appear on customer screens. Keep it short and recognisable.
- Enter your business website, address and a customer-care email. These show on your Business Profile.
- Enter the phone number. Pick the verification method (SMS or voice) — voice works for landlines too.
- Enter the 6-digit code Meta sends.
If verification fails with "This number is registered with WhatsApp", go to the existing WhatsApp app on a handset that holds the number, open Settings → Account → Delete my account, complete that, and try again in 30 minutes.
Part 2 · Get credentials from Meta
WhatsApp Cloud API runs via a Meta App (developer app). You'll create one app, attach the WhatsApp product, and pull out four pieces of information.
Create a Meta App and add the WhatsApp product
- Go to developers.facebook.com/apps.
- Click Create App → choose use case "Other" → app type Business.
- Name the app (e.g. "Acme WhatsApp"), attach it to your Business Manager.
- Once created, on the app dashboard click Add Product → find WhatsApp → Set up.
- Select your WABA from the dropdown and continue.
You should now see the WhatsApp panel inside the Meta App, with a Phone Number ID and WhatsApp Business Account ID on the "API Setup" page. Copy both — you'll paste them into MsgHub shortly.
| What you need | Where it lives |
|---|---|
Phone Number ID | WhatsApp → API Setup → "From" dropdown shows the number; the long numeric ID below it |
WhatsApp Business Account ID | Same page, labelled "WhatsApp Business Account ID" |
Generate a permanent (System User) access token
The token shown on the "API Setup" page is temporary (24-hour expiry) — useful only for testing. For production you must generate a permanent System User token.
- Open Business Settings → Users → System Users.
- Click Add. Name it (e.g. "msghub-system-user") and set role Admin.
- With the System User selected, click Add Assets → Apps → tick the Meta App you just created → give Full control.
- Click Add Assets again → WhatsApp Accounts → tick your WABA → give Full control.
- Click Generate New Token. Pick the Meta App. Set Expiration: Never. Tick the scopes:
whatsapp_business_messagingwhatsapp_business_management
- Click Generate Token. Copy the token immediately — Meta won't show it again.
Treat this token like a password. Anyone with it can send messages from your number. Don't paste it in email, Slack or shared docs. MsgHub stores it AES-256-GCM encrypted at rest.
Find your App Secret
The App Secret is used to verify that inbound webhooks really came from Meta (HMAC signature check). MsgHub uses it for every incoming message.
- In your Meta App dashboard, left sidebar → Settings → Basic.
- Find App Secret. Click Show → enter your Facebook password.
- Copy the value. Also note your App ID from the same page (you don't need it for MsgHub, but it's useful for Meta support tickets).
You should now have four pieces of information collected:
| Credential | Source |
|---|---|
Phone Number ID | WhatsApp → API Setup |
WhatsApp Business Account ID | WhatsApp → API Setup |
Permanent Access Token | System Users → Generate Token |
App Secret | Meta App → Settings → Basic |
Part 3 · Connect WhatsApp to MsgHub
Paste credentials into MsgHub
- Login to your MsgHub dashboard at
https://app.msghub.info. - Click Settings at the bottom of the left sidebar.
- Scroll to the WhatsApp Configuration section.
- Pick one of two paths:
- Embedded Signup (recommended): click "Connect WhatsApp via Facebook". A Facebook OAuth popup auto-fills WABA ID, Phone Number ID and Access Token. Skip to step 6.
- Manual: fill the fields below.
- Manual path — paste each field with what you collected in Part 2:
| MsgHub field | Section | Paste from |
|---|---|---|
| Meta App ID | Meta App Credentials | Meta App → Settings → Basic |
| Meta App Secret | Meta App Credentials | Meta App → Settings → Basic (used for webhook HMAC) |
| WABA ID | Manual entry | Meta → WhatsApp → API Setup |
| Phone Number ID | Manual entry | Meta → WhatsApp → API Setup |
| Access Token (System User) | Manual entry | System User permanent token |
| Webhook Verify Token | Manual entry | You make this up (any random string) |
The Your Webhook URL field is read-only and auto-generated from your tenant ID — copy it for Part 4. Click Save.
After saving, click "Test Connection". A green tick confirms MsgHub can reach Meta with your credentials. If it fails, paste each value again carefully — leading/trailing whitespace from copy-paste is the most common cause. The most common cause of HMAC errors on inbound is a wrong Meta App Secret.
Part 4 · Point Meta's webhook at MsgHub
So far Meta knows nothing about MsgHub. Webhooks are how Meta tells MsgHub "a customer just messaged you".
Copy your webhook URL from MsgHub
On the WhatsApp channel page in MsgHub Settings, you'll see your Callback URL displayed. It looks like:
https://app.msghub.info/api/webhooks/whatsapp/{your-tenant-id}
The tenant ID is unique to your account — every MsgHub tenant has a separate webhook endpoint, so Meta callbacks for your number never mix with anyone else's.
Configure the webhook in your Meta App
- In your Meta App dashboard, left sidebar → WhatsApp → Configuration.
- Under Webhook, click Edit.
- Paste the Callback URL from MsgHub into the Callback URL field.
- Paste the same Verify Token you saved in MsgHub (from Step 7).
- Click Verify and Save. Meta will hit your URL with a challenge — if MsgHub responds correctly you'll see a green tick.
Subscribe to webhook fields
Saving the webhook URL alone isn't enough — you also have to tell Meta which events to send. On the same Configuration page, under Webhook fields, click Manage and subscribe to:
messages— inbound customer messages (this is the main one)message_status— delivery / read receiptsmessage_template_status— when Meta approves or rejects your templates
Click Done. Webhooks now flow.
Part 5 · Send your first message
Test inbound — message your number
From any handset that is not the number you registered, open WhatsApp and send "hello" to your business number. Within a few seconds:
- The message should appear in MsgHub Inbox → WhatsApp.
- A new contact is created automatically.
If nothing arrives, jump to Troubleshooting below.
Test outbound — reply from MsgHub
From the conversation panel in MsgHub Inbox, type a reply and send. Because the customer messaged you first, you're inside the 24-hour customer service window, which means free-form messages are allowed. The message should arrive on the test handset within a few seconds.
The 24-hour window: from the moment a customer messages you, you have 24 hours to send any free-form text or media reply. After that, to re-engage them, you must use an approved Message Template (covered next).
Creating and submitting message templates
If you want to initiate a conversation — order updates, OTPs, marketing broadcasts, appointment reminders — the first message must use a pre-approved Message Template.
Create a template
- In MsgHub: Templates → New Template. (Or directly inside Meta Business Manager → WhatsApp Manager → Message Templates → Create.)
- Pick a category:
- Utility — account updates, order status, appointment confirmations. Fastest approval, lowest cost.
- Authentication — OTPs and login codes only. Strict format restrictions.
- Marketing — promotions and offers. Highest cost, strictest review.
- Pick a language (you can add multiple translations under the same template name).
- Write the body. Use
{{1}},{{2}}for variables. Example:# Template body Hi {{1}}, your order {{2}} has shipped 🚚 Track here: {{3}} Reply STOP to opt out.
- Add a header, footer or buttons (Quick Reply / Call-to-Action URL) if needed.
- Click Submit for Review.
What gets templates rejected
- Variables at the very start or end of a message body (Meta wants them surrounded by real text).
- Marketing content tagged as Utility — pick the right category.
- Vague example values when filling out the preview (use real-looking samples).
- Missing opt-out language in Marketing templates.
- Promotional emojis like 🎁🎉 inside Utility category.
Sending an approved template
Once Meta approves (usually within 1–2 hours, sometimes longer for Marketing), the template ID appears in MsgHub with status APPROVED. You can now:
- Send it manually from Inbox → "Send Template".
- Trigger it from a Campaign or Automation flow.
- Trigger via REST API:
POST https://app.msghub.info/api/v1/messages/send Authorization: Bearer mh_live_YOUR_API_KEY Content-Type: application/json { "to": { "phone": "+9198XXXXXXXX" }, "templateId": "" }
One unified /messages/send endpoint — the template's channel (whatsapp / sms / email / rcs) determines dispatch. See REST API reference for details.
Green tick (Official Business Account)
The famous WhatsApp green tick is Meta's Official Business Account badge. It is not required to use the API — your number can send and receive messages without it — but it raises customer trust.
What you get
- Green tick next to your business name on customer screens.
- Business name displayed prominently (before they save your number to contacts).
- Higher daily messaging limits at every tier.
How to apply
- In Meta Business Manager → WhatsApp Accounts → your WABA → Settings → WhatsApp Business Profile.
- Find Account Quality → Official Business Account status → Apply.
- Submit supporting evidence: press articles, Wikipedia page, large social following, or proof of being a well-known brand in your sector.
Green tick is granted at Meta's discretion based on brand notability — small businesses are often declined. The Verified blue badge is the more accessible alternative and auto-granted to most legitimately registered businesses once the number is active for a few weeks.
Troubleshooting common issues
"Webhook verification failed" in Meta
Meta's Verify and Save on the webhook page returns an error.
- Most common cause: the Verify Token in Meta doesn't exactly match what you saved in MsgHub. Re-copy from MsgHub, paste fresh, check for trailing spaces.
- Second cause: the Callback URL is missing the tenant ID at the end. The URL must look like
/api/webhooks/whatsapp/{tenant-id}, not just/api/webhooks/whatsapp. - Rare cause: firewall on your side blocking outbound, or Meta IPs blocked by an upstream proxy.
"HMAC signature mismatch" in MsgHub logs
Inbound messages reach MsgHub but get rejected with a signature error.
- The App Secret in MsgHub doesn't match the one in your Meta App. Re-copy from Meta App → Settings → Basic → App Secret → Show and re-paste in MsgHub.
- After re-pasting, click Test Connection to confirm.
Inbound messages don't appear in MsgHub Inbox
- Did you subscribe to the
messageswebhook field in Meta? (Step 10) Without that subscription, Meta never sends inbound events. - Is the test message coming from a different handset than your business number? You can't message your own number.
- Check Meta's Recent Webhook Activity log inside the App dashboard — it shows every webhook call and the response code MsgHub returned. Anything non-200 is a problem.
"Template rejected" notification
- Read Meta's rejection reason on the template detail page — it tells you exactly which guideline you hit.
- Most common: category mismatch (Utility template containing promotional language) — change category and resubmit.
- Second most common: variable in a position Meta doesn't allow (e.g. body starts with
{{1}}).
"Cannot register this phone number" during Part 1
- The number is still active on regular WhatsApp / WhatsApp Business app. Open that app, Settings → Account → Delete my account, wait ~30 minutes, retry.
- The number was previously registered to a different WABA and the migration cooldown hasn't expired (180 days). Contact Meta support.
Messages sent successfully but customer never receives them
- Customer has blocked your number. WhatsApp returns
deliveredfor the platform but never shows on their handset. - Customer's number is not on WhatsApp at all (rare in India, common in some segments). Check the contact's WhatsApp existence first.
- You used a template variable that violates content rules — Meta silently drops some edge cases.
Frequently asked questions
Can I use my existing personal WhatsApp number?
No. The number you register with Cloud API must not be active on regular WhatsApp or the WhatsApp Business app. If your number is on either, you must delete the account inside that app first, then wait ~30 minutes before registering on Cloud API. Any chat history on that number will be lost.
How long does Meta take to approve a message template?
Most templates are approved within 1–2 hours. Marketing templates may take longer or be rejected if they contain promotional content without clear opt-out language. Utility and Authentication templates have the highest approval rate.
What is the 24-hour customer service window?
Once a customer messages you, you have 24 hours to reply with any free-form message (text, image, document). After 24 hours of customer silence, you can only re-engage them using a pre-approved template (Marketing / Utility / Authentication category). The 24-hour clock resets every time the customer sends a new message.
Do I need the WhatsApp Green Tick to use the API?
No. The green tick (Official Business Account badge) is optional and granted by Meta based on brand notability. You can send and receive messages on Cloud API without it. The Verified badge is more accessible to legitimate businesses.
What if my webhook verification keeps failing?
Most common cause: the Verify Token in Meta App Configuration does not exactly match what you saved in MsgHub. Re-copy from MsgHub, paste fresh, check for trailing whitespace. Second most common: the Callback URL is missing your tenant ID at the end.
How much does WhatsApp Business API cost?
Meta charges per conversation, not per message. India 2026 rates: Marketing ~₹0.78, Utility ~₹0.14, Authentication ~₹0.13, Service-tier conversations are free within the 24-hour window. MsgHub does not add a markup on Meta charges — you pay Meta directly through your billing setup; MsgHub's platform fee is flat.
Can I move my number off MsgHub later?
Yes. Your WhatsApp Business Account and phone number live in your own Meta Business Manager — MsgHub never owns them. To switch platforms, revoke the access token in Meta and connect a new platform with fresh credentials. No data lock-in.
Can I have multiple phone numbers on one MsgHub account?
Yes. Add each as a separate channel in Settings — each gets its own Phone Number ID. Inbound conversations route to the correct number's inbox automatically. Useful for businesses running parallel brands or geographic teams.
Is my customer data shared with anyone?
No. Conversation data is stored encrypted in MsgHub's database under your tenant only. We don't sell, share or train models on your messages. See our Security page for the full architecture.
What's next
Now that WhatsApp is live, the natural next moves are: