WhatsApp

Let customers chat with your bot on WhatsApp — connect your own number via Meta's Cloud API.

~45 minutes (plus Meta review waits) Starter

Before you start

WhatsApp connects to DGbot through Meta's official WhatsApp Business Platform (Cloud API). You create the Meta-side account yourself — it stays yours — and paste four values into DGbot. Once connected, your bot answers customer messages on WhatsApp using the same knowledge base, tools, and handoff rules as your website widget.

You'll need:

  • A Facebook account (to access Meta's business tools)
  • A phone number for the bot that can receive an SMS or voice call once during setup
  • Your business details (legal name, website) for Meta's display-name review
Your number's existing WhatsApp account will be deleted
Registering a number on the Cloud API permanently removes any WhatsApp account currently using it — chats, groups, everything. Never use your personal number. Use a dedicated business number, and if it's currently active in the WhatsApp or WhatsApp Business app, delete that account first (WhatsApp → Settings → Account → Delete account), then wait a few minutes.
Try it risk-free with Meta's test number
Every Meta developer app includes a free test number that can message up to 5 phone numbers you allowlist. You can complete this entire guide — including talking to your bot — on the test number, and swap in your real number later. We recommend doing exactly that.
What it costs
Nothing extra for customer support. WhatsApp lets businesses reply free for 24 hours after each customer message, and your bot only ever *replies* — so inbound Q&A carries no Meta message fees. Meta charges only if you later send business-initiated template messages (marketing, notifications).

Set up on Meta

1
Create a business portfolio

Go to business.facebook.com and sign in with your Facebook account. If you don't already have a business portfolio, create one with your company name. This is your business's identity across Meta's tools.

2
Create a Meta developer app

Go to developers.facebook.com/appsCreate App.

  • On Use cases, select "Connect with customers through WhatsApp"
  • On Business, link the business portfolio from step 1
  • Finish the wizard and open your new app's dashboard
deploy/whatsapp-use-case Screenshot needed — save as: _assets/images/deploy/whatsapp-use-case.png

Select Connect with customers through WhatsApp on the Use cases screen.

3
Set up your number

In the app dashboard, open WhatsApp → API Setup.

Using the test number (recommended first): Meta already created one for you — it appears in the From dropdown. Under To, click *Manage phone number list* and add up to 5 phones you'll test from (each confirms via OTP).

Using your real number: open WhatsApp Manager → Account tools → Phone numbers → Add phone number, enter your dedicated business number, and verify it via SMS or voice OTP. Then set your display name (e.g. "Acme Support") — Meta reviews it, usually within hours. Generic or trademarked names get rejected.

deploy/whatsapp-api-setup Screenshot needed — save as: _assets/images/deploy/whatsapp-api-setup.png

The API Setup page — your test number, Phone number ID, and WABA ID all live here.


Get your credentials

DGbot needs four values. Collect them all before switching to the DGbot admin.

4
Copy the Phone number ID and WABA ID

Both are on the WhatsApp → API Setup page, just under the From number:

  • Phone number ID — a long numeric ID (this is *not* the phone number itself)
  • WhatsApp Business Account ID (WABA ID) — shown alongside it
5
Generate a permanent access token

The token shown on the API Setup page is temporary (24h) — don't use it. Create a permanent one:

1. Go to Business Settings → Users → System users (business.facebook.com/settings)

2. Add a system user — name it anything (e.g. dgbot-api), role Admin

3. On the new system user, click Add assets → Apps, select your app, enable Full control, save

4. Click Generate new token → select your app → expiration Never → check the scopes whatsapp_business_messaging and whatsapp_business_management → Generate

deploy/whatsapp-system-user-token Screenshot needed — save as: _assets/images/deploy/whatsapp-system-user-token.png

Generating the permanent token: app selected, expiry Never, both WhatsApp scopes checked.

Copy the token immediately
Meta shows the token once. Store it in a password manager. If you lose it, generate a new one and update it in DGbot.
6
Copy the App secret

In the app dashboard, go to App settings → Basic (bottom of the left sidebar). Click Show next to App secret and copy it. DGbot uses this to verify that webhook calls really come from Meta.

deploy/whatsapp-app-secret Screenshot needed — save as: _assets/images/deploy/whatsapp-app-secret.png

The App secret on the App settings → Basic page.


Connect DGbot

7
Paste your credentials into DGbot
Open WhatsApp settings in admin

Fill in the four fields — Phone number ID, WABA ID, permanent access token, and App secret — pick which chatbot should answer, and click Connect.

DGbot validates the credentials against Meta live: if they're correct you'll see your number's display name appear; if anything is wrong you'll get the exact error immediately. Your token and secret are encrypted at rest and never shown again.

deploy/whatsapp-dgbot-settings Screenshot needed — save as: _assets/images/deploy/whatsapp-dgbot-settings.png

The DGbot WhatsApp settings page after a successful connection.


Wire up the webhook

This is how Meta delivers your customers' messages to DGbot.

8
Configure the webhook in your Meta app

After connecting, the DGbot settings page shows your unique Callback URL and Verify token (copy buttons next to each).

1. In your Meta app dashboard, go to WhatsApp → Configuration

2. Under Webhook, click Edit, paste the Callback URL and Verify token exactly as copied, and click Verify and save

3. Under Webhook fields, click Manage and subscribe to messages

The status badge in DGbot flips to Connected the moment step 2 succeeds.

deploy/whatsapp-webhook-config Screenshot needed — save as: _assets/images/deploy/whatsapp-webhook-config.png

Meta's webhook configuration — Callback URL, Verify token, and the messages field subscription.


Test it

Send a WhatsApp message to your business number from an allowlisted phone (or any phone, if you're on a real number). You should see:

1. Blue ticks and a typing… indicator while the bot thinks

2. An answer from your bot's knowledge base, with sources if you have them enabled

The conversation also appears in your admin Conversations list with a whatsapp channel tag, and human handoff works the same as on the widget — when a customer asks for a person, the chat lands in your Live Inbox and your agents' replies are delivered back to WhatsApp.

You can also use the Send a test message card on the DGbot settings page to confirm the outbound direction independently.

Going live with your real number later?
If you started on the test number, switching is small: register your real number (step 3), then update only the Phone number ID on the DGbot settings page. Everything else — token, secret, webhook — stays the same as long as the number lives in the same Meta app.

Troubleshooting

SymptomLikely cause & fix
Meta says *"The callback URL or verify token couldn't be validated"*The URL or token wasn't copied exactly. Re-copy both from the DGbot settings page with the copy buttons — no extra spaces, no placeholders.
DGbot says *"Meta rejected these credentials"* on ConnectWrong Phone number ID (it's the numeric ID, not the phone number), or the token is missing the two whatsapp_business_* scopes, or the system user doesn't have your app assigned with full control.
Badge shows Token error — reconnectYour access token was revoked or regenerated on Meta's side. Generate a new permanent token (step 5) and update it in DGbot. Incoming messages are not lost while this is broken.
Messages send but the bot never repliesThe webhook isn't delivering: confirm you subscribed to the messages field (step 8.3), and that the badge says Connected.
Bot replies don't arrive on your phoneOn a test number, your phone must be in the 5-recipient allowlist (step 3). Check the recipient list in WhatsApp → API Setup.
The bot answers but a human can't take overHandoff rules are the same as the widget — check your availability settings under Settings → Handoff (business hours, agent availability).