AssistFlow.ai · Blog

Connect WhatsApp Business Cloud API to AssistFlow: Step-by-Step Guide

AssistFlow AI · 2026-04-20

Connect WhatsApp API to AssistFlow: A Step-by-Step Guide

Time: ~10 minutes · Skill level: Intermediate · Cost: Free with the Meta-provided test number

In this guide we'll spin up a WhatsApp Business Cloud API app on Meta for Developers, connect it to AssistFlow, and turn on AI auto-replies for incoming messages. Every step has been tested live.

Prerequisites

1. Create a Meta for Developers app

  1. Go to developers.facebook.com/apps and click Create App.
  2. Pick use case "Other" and app type "Business".
  3. Enter an app name (e.g. "AssistFlow WhatsApp") and your contact email, then select your Business Account.

2. Add the WhatsApp product

  1. From the app dashboard sidebar click "Add product" and hit "Set up" on the WhatsApp card.
  2. Select a Business Portfolio (or create one).
  3. Meta will auto-provision a test phone number and a WhatsApp Business Account (WABA) — you can send free messages with it during development.
Tip: The test number can message up to 5 unique users in 24 hours. To go live, verify your own number under "Add phone number".

3. Grab your Phone Number ID, WABA ID and display number

From the sidebar open WhatsApp → API Setup:

Copy these four values somewhere safe — we'll paste them into AssistFlow next.

4. Generate a Permanent Access Token

The "Temporary access token" on API Setup expires in 24 hours. For production, create a System User in Meta Business and issue a permanent token to it:

  1. business.facebook.com → Settings → Users → System Users
  2. Add → name it (e.g. "AssistFlow Token"), set role to Admin.
  3. Select the new user → Add Assets → Apps → pick your AssistFlow app → grant Manage app.
  4. Add WhatsApp Accounts as an asset too → grant Manage WhatsApp account.
  5. Generate New Token → select your app → enable at least:
    • whatsapp_business_management
    • whatsapp_business_messaging
    • business_management
  6. Toggle "Never expires" on → Generate → copy the token immediately (Meta won't show it again).
Security: This token grants full access to your WhatsApp account. Don't paste it into a repo, Slack, or email — only into AssistFlow's encrypted settings field.

5. Paste credentials into AssistFlow

  1. Sign in to your AssistFlow Developer Dashboard → WhatsApp AI → WhatsApp Settings.
  2. In the Meta Cloud API Credentials card paste:
    • Phone Number ID
    • WhatsApp Business Account ID
    • Permanent Access Token
    • Display Phone Number
    • Verified Business Name
  3. Hit Save at the bottom. The system auto-generates a Webhook Verify Token for you.

6. Wire the webhook on Meta's side

After saving, the Webhook Settings card shows two values:

Callback URL : https://<project>.supabase.co/functions/v1/whatsapp-webhook
Verify Token : (auto-generated, click "Copy")

Now back to Meta Developer Portal:

  1. Sidebar → WhatsApp → Configuration → Webhook.
  2. Paste Callback URL and Verify Token → Verify and save.
  3. In "Webhook fields" Subscribe to messages. (Optional: also subscribe to message_template_status_update and account_update.)

7. Enable AI replies

AssistFlow → WhatsApp Settings → Auto-Reply Settings card:

Hit Save again.

8. Test it

  1. From the test number's "Send and receive messages" panel, send a message — write to the number from your own WhatsApp.
  2. Within 30 seconds you should see the AI's reply on your WhatsApp.
  3. Open WhatsApp Messages in AssistFlow → confirm the message logged as inbound + outbound.

9. Go to production

  1. Meta Developer Portal → App Review → Permissions and Features → Request Advanced Access for whatsapp_business_messaging and whatsapp_business_management.
  2. WhatsApp → Phone Numbers → Add phone number → add your real business number, verify via SMS/Voice.
  3. Update the new Phone Number ID in AssistFlow (replace the test one).
  4. Switch the app mode to Live.

Common issues

"Webhook verification failed"
Verify Token mismatched or you didn't save AssistFlow first. Save Settings, then paste into Meta.
Messages arrive but AI doesn't reply
"AI Replies Active" might be off. Also if "Default Widget" isn't set, the AI doesn't know which persona to use.
"Re-engagement" / 24-hour window error
WhatsApp policy: if a customer hasn't messaged you in 24 hours, you can only reach them with an approved template. Sync templates from Meta in the Templates tab.
Token expired
You used the temporary (24h) token. Use the System User flow in step 4 to get a permanent token.

Next steps

Need help? Email support@assistflow.ai — setup support is included in your plan.