How to Set Up WhatsApp Cloud API in 2026: Complete Step-by-Step Tutorial
The Cloud API is free. Meta gives you 1,000 service conversations/month. Here is the full setup — and the 3-minute PostEngage shortcut.
What You'll Need
The official WhatsApp Cloud API from Meta is the only sanctioned way to send and receive WhatsApp messages programmatically in 2026. The On-Premises API is deprecated. Browser emulators and unofficial mods get banned within weeks.
- A personal Facebook account (used to log in).
- A Meta Business Manager account at business.facebook.com (free).
- A phone number not currently on the WhatsApp consumer app.
- Government business documents (GST certificate, business registration, or equivalent) for verification.
- Basic familiarity with curl or Postman if you go raw API. Or skip all of this with a no-code BSP.
Step-by-Step: Set Up WhatsApp Cloud API
Step 1: Create a Meta Business Manager
Go to business.facebook.com and click Create Account. Enter your business name, your full name, and business email. Verify the email confirmation link Meta sends.
Step 2: Add business information
In Business Settings > Business Info, fill in your legal business name (exact match to registration documents), street address, phone, and website. This is required before Meta approves marketing templates.
Step 3: Create a Meta App
Visit developers.facebook.com/apps and click Create App. Choose the Business app type. Give it a name (for example "Acme WhatsApp"). Link it to your Business Manager.
Step 4: Add the WhatsApp product
On your app dashboard, scroll to Add Product and click Set Up under WhatsApp. This provisions a free test phone number (in the format +1 555 XXXX XXXX) and gives you a temporary 24-hour access token.
Step 5: Send your first test message
In WhatsApp > Getting Started, copy the pre-filled curl command. Replace the recipient placeholder with your own phone number (in international format, no spaces — for example 919876543210). Add your phone as a test recipient first. Run the curl in your terminal:
curl -X POST \
https://graph.facebook.com/v21.0/PHONE_NUMBER_ID/messages \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"messaging_product": "whatsapp",
"to": "RECIPIENT_PHONE",
"type": "template",
"template": {
"name": "hello_world",
"language": { "code": "en_US" }
}
}'You should receive the hello_world template on your WhatsApp in 1-3 seconds.
Step 6: Add your real business phone number
In WhatsApp > Phone Numbers, click Add Phone Number. Enter your business number. Choose SMS or voice OTP. Enter the 6-digit verification code. The number is now claimed on Cloud API.
Step 7: Generate a permanent access token
Tokens from the dashboard expire in 24 hours. For production:
- 1. Go to Business Settings > Users > System Users.
- 2. Click Add. Name it (e.g. "whatsapp-prod"). Choose role Admin.
- 3. Click Add Assets. Add your App and WhatsApp Account.
- 4. Click Generate New Token. Select your app. Choose scopes:
whatsapp_business_messagingandwhatsapp_business_management. - 5. Copy the token immediately — it is shown only once.
Step 8: Subscribe a webhook
Webhooks let you receive incoming messages. Under WhatsApp > Configuration, click Edit next to Callback URL. Enter your HTTPS endpoint and a verify token (any random string you choose). Meta pings your endpoint with a challenge — return the challenge to verify.
Subscribe to messages, message_status, and message_template_status.
Step 9: Submit business verification
In Business Settings > Security Center, click Start Verification. Upload your business registration certificate, GST certificate (India), or equivalent. Meta approves within 2-5 business days. Verification is required for marketing template messages.
Step 10: Submit your first marketing template
Under WhatsApp Manager > Message Templates, click Create Template. Choose category (Marketing, Utility, Authentication). Add header, body with variables, and buttons. Submit. Approval takes 1-24 hours.
Common Issues and Fixes
"Token expired" error
You are using a temporary 24-hour token. Create a System User and generate a permanent token. Store it as an environment variable; never hardcode.
Webhook verification fails
Your endpoint must be HTTPS (no self-signed certs), must return the hub.challenge as plain text, and must match the verify token exactly. Use ngrok for local testing.
Template rejected
Most common reasons: promotional language in a Utility template, missing variables, or no opt-in proof for marketing categories. Meta's rejection email lists the exact issue.
Phone number stuck in pending
Wait 10 minutes after OTP. If still pending, try voice OTP. Indian operators occasionally block SMS from Meta.
Verify Your Setup
Five checks before you go live:
- 1. Send a template message via curl → arrives within 3s.
- 2. Reply from the recipient phone → your webhook receives the message payload.
- 3. Check token expiry → must be permanent (no expiry).
- 4. Confirm business verification status is Verified.
- 5. At least one marketing template approved by Meta.
The PostEngage Shortcut: 3 Minutes Instead of 20
If writing curl, managing tokens, hosting webhooks, and submitting templates does not sound fun, PostEngage handles every one of those steps under the hood. You get a no-code dashboard with the same Cloud API underneath, plus free keyword auto-replies forever:
Sign up at postengage.ai with business email.
Click Connect WhatsApp. Complete Meta embedded signup. Verify OTP.
Add your first keyword rule and toggle it live. Done.
You still own your Cloud API account — PostEngage is a Meta Business Partner integration that operates on your behalf. Migrate away anytime. Read more about our no-code reply automation setup.
FAQ
Is WhatsApp Cloud API free?
Yes. Meta does not charge for Cloud API access. You pay per conversation, and Meta gives 1,000 free service conversations/month. Marketing messages start at $0.005- $0.07 each.
Do I need to be a developer?
Only for the raw API. PostEngage abstracts every step and gives you a no-code dashboard with free keyword replies.
How long does business verification take?
2-5 business days for Indian businesses with complete documents. You can send service replies immediately without verification.
Cloud API vs On-Premises API?
Cloud API: hosted by Meta, free, instant. On-Premises: deprecated in 2025. Always choose Cloud API for new setups.
PostEngage handles every step — embedded signup, token management, webhooks, template submission. Free keyword auto-replies forever. 100 AI credits on signup.
Start FreeRelated Posts
Instagram Comment Automation: The Complete Guide to Auto-Replies That Convert
Turn every comment into a lead with smart auto-reply triggers. The complete guide to comment-to-DM funnels in 2026.
The 'Silent' Lead Magnet: How Follow-to-DM Automation is Changing the Game
Turn new followers into leads instantly. Learn how to legally and effectively use the "Follow to DM" trigger to grow your email list.
How to Get More Instagram DMs in 2026: 15 Proven Strategies That Actually Work
DM open rates hit 80%+ vs email at 20%. Learn the strategies top creators use to flood their inbox with high-intent messages.
Ready to put this into practice?
The complete Instagram automation playbook in one place.