Connect WhatsApp to Dchat

Setup guide · WhatsApp

Answer WhatsApp messages with the same AI and the same inbox as your website chat. Connect through Meta's WhatsApp Cloud API, or through a Twilio WhatsApp sender if you already use Twilio.

Before you start

  • Difficulty: Hard
  • Time: 30–60 minutes
  • You need: A Meta developer app with the WhatsApp product added, and a WhatsApp Business phone number
  • You need: Or: a Twilio account with an approved WhatsApp sender
  • You need: Admin or owner access to your Dchat workspace

Steps

  1. Meta Cloud API: collect three values

    In your Meta app's WhatsApp API setup page, copy the phone number ID and an access token. Temporary tokens expire after a day, so create a permanent token for a system user in Meta Business settings. Copy the app secret from the app's basic settings.

  2. Add the channel in Dchat

    In Dchat, open Settings → Channels and choose + Add channel. Pick "WhatsApp (Meta Cloud API)", put the phone number ID in the identifier field, and paste the credentials. The verify token is any phrase you choose, without spaces.

    { "AccessToken": "EAAG...", "AppSecret": "...", "VerifyToken": "any-phrase-you-choose" }
  3. Point Meta's webhook at Dchat

    In the WhatsApp configuration page of your Meta app, set the callback URL below and the same verify token. Meta checks it straight away. Then subscribe to the messages field.

    https://api.dchat.com/api/inbound/meta
  4. Or: connect a Twilio WhatsApp sender instead

    In Dchat, open Settings → Channels and choose + Add channel. Pick "WhatsApp", put your sender number in +E.164 form in the identifier field, and paste your Twilio Account SID and Auth Token. In Twilio, set the sender's incoming message webhook to the URL below, method POST.

    { "AccountSid": "AC...", "AuthToken": "..." }
    
    https://api.dchat.com/api/inbound/whatsapp/twilio
  5. Send a test message

    Message the number from your phone. The conversation appears in your Dchat inbox, and the AI replies if AI is switched on for your workspace. The channel shows Ready once every required value is saved.

What goes in each field

  • AccessToken: Meta Cloud API: a permanent system-user access token with WhatsApp messaging permission.
  • AppSecret: Meta Cloud API: your Meta app's app secret. Dchat checks Meta's signature on every webhook with it.
  • VerifyToken: Meta Cloud API: any phrase without spaces; type the same one into Meta's webhook settings.
  • AccountSid, AuthToken: Twilio: from your Twilio console. The Auth Token checks Twilio's signature, so messages are rejected without it.

Good to know

  • Dchat sends free-form replies only, not WhatsApp message templates. WhatsApp only allows those within 24 hours of the customer's last message; a later reply fails and the conversation shows a delivery warning.
  • Replies can carry up to 3 buttons on the Cloud API. Twilio replies are plain text.
  • Text, button replies, photos and PDFs are handled; files over 5 MB and voice notes are not read yet.
  • Twilio's shared WhatsApp sandbox number can only be connected to one Dchat workspace, because each number maps to one workspace.
  • Your workspace needs at least one enabled site; new workspaces have one already. Messages are dropped while every site is switched off.
  • Credentials are encrypted when you save them and are never shown again. To change one, paste the full credentials again.

One-click "Connect with Facebook" is not available yet, so the Cloud API route uses your own Meta app. If that is more than you want to set up, Twilio is the shorter path.