🚀 New: Anjok Connect WhatsApp Business App — Get Demo ₹500/mo

Complete WhatsApp Cloud API Setup Guide (2026) – Meta Official Method (Step-by-Step)

📌 Step 1: Create Meta Developer Account

  1. Go to: https://developers.facebook.com
  2. Click Get Started
  3. Login with your Facebook account
  4. Verify your account (OTP + details)

👉 Now your Meta Developer account is ready.

📌 Step 2: Create a New App

  1. Click My Apps → Create App
  2. Select Business type
  3. Enter:
    • App Name
    • Email
  4. Click Create App

📌 Step 3: Add WhatsApp Product

  1. Inside your app dashboard
  2. Click Add Product
  3. Select WhatsApp → Set Up

👉 Now WhatsApp API is added to your app.

📌 Step 4: Get Temporary Access Token

After setup, you will see:

  • Phone Number ID
  • WhatsApp Business Account ID
  • Temporary Access Token

👉 Copy the Access Token

📌 Step 5: Send Test Message

Use this API:

 

POST https://graph.facebook.com/v18.0/PHONE_NUMBER_ID/messages

 

Example JSON:

 

{
  "messaging_product": "whatsapp",
  "to": "YOUR_NUMBER",
  "type": "text",
  "text": {
    "body": "Hello from WhatsApp Cloud API 🚀"
  }
}

 

👉 Replace:

  • PHONE_NUMBER_ID
  • YOUR_NUMBER

📌 Step 6: Setup Webhook (Important)

  1. Go to WhatsApp → Configuration
  2. Click Edit Webhook
  3. Enter:
    • Callback URL
    • Verify Token

Example Verify Script (PHP):

 

if ($_GET['hub_verify_token'] === '12345') {
    echo $_GET['hub_challenge'];
}

 

👉 This is required to receive incoming messages.

📌 Step 7: Subscribe to Events

Select:

  • messages
  • message_status

Click Subscribe

📌 Step 8: Make Token Permanent

Temporary token expires in 24 hours.

👉 To fix:

  1. Go to System Users in Meta Business
  2. Generate Permanent Access Token
  3. Assign WhatsApp permissions

⚠️ Common Errors & Fixes

❌ Error: Unsupported post request

👉 Fix:

  • Check PHONE_NUMBER_ID
  • Check API version

❌ Error: Invalid OAuth Access Token

👉 Fix:

  • Token expired
  • Generate new token

❌ Error: Recipient not allowed

👉 Fix:

  • Add number in test recipients

❌ Webhook not verifying

👉 Fix:

  • Verify token mismatch
  • HTTPS required

🎯 Pro Tips

  • Use templates for bulk messaging
  • Always use HTTPS webhook
  • Store access token securely
  • Use queue system for bulk sends

💡 Use Cases

  • Customer support automation
  • Order updates
  • OTP verification
  • Marketing campaigns

🏁 Conclusion

Setting up WhatsApp Cloud API is easy if you follow the correct steps. With Meta’s official API, you can build powerful automation tools and grow your business faster.