
Chatwith Support
How to set up WhatsApp for your Chatwith Agent
Connecting your agent to WhatsApp lets your customers reach your AI assistant from the messaging app they already use every day. This guide walks you through the full setup: creating a Meta app, configuring the WhatsApp Cloud API webhook, and pasting the right credentials into Chatwith.
Plan on 15–30 minutes for first-time setup. Most of the time is spent inside Meta's Business and Developer dashboards.
Before you start
You'll need:
- A Meta Business Account (business.facebook.com).
- A phone number that isn't already in use on the WhatsApp consumer app or WhatsApp Business app. Meta will use this number as your agent's WhatsApp number. (You can also use one of Meta's free test numbers while you're trying things out.)
- Admin access to your Chatwith Agent's Integrations settings.
Step 1 — Open the WhatsApp integration form in Chatwith
- In Chatwith, go to your agent's Settings → Integrations.
- Scroll to the WhatsApp section.
You'll see four fields:
- Webhook Callback URL — pre-filled by Chatwith. You'll paste this into Meta.
- Webhook Verify Token — pre-filled by Chatwith. You'll paste this into Meta.
- WhatsApp Access Token — you'll fill this in from Meta.
- Facebook App Secret — you'll fill this in from Meta.
Keep this page open. You'll come back to it in Step 5.
Step 2 — Create a Meta App with the WhatsApp product
- Go to developers.facebook.com/apps and click Create app.
- Choose Business as the app type.
- Give the app a name (e.g. "My Agent WhatsApp") and finish creating it.
- On your app's dashboard, find WhatsApp in the product list and click Set up.
- Connect the app to your Meta Business Account when prompted.
Meta will provision a test phone number for you and a WhatsApp Business Account under the hood.
Step 3 — Configure the webhook in Meta
This is the step that connects WhatsApp to Chatwith so incoming messages reach your agent.
- In your Meta app, go to WhatsApp → Configuration (sometimes labelled "Webhook").
- Click Edit next to "Callback URL".
- Paste the Webhook Callback URL from your Chatwith Integrations page (it looks like
https://integrations.chatwith.tools/whatsapp/webhook/...). - Paste the Webhook Verify Token from Chatwith into Meta's "Verify token" field.
- Click Verify and save. If Meta can't verify, double-check that you copied both values exactly.
- Under Webhook fields, click Manage and subscribe to the
messagesfield. This is what tells Meta to forward incoming messages to Chatwith.
Step 4 — Get your Access Token and App Secret
You need two values to authenticate Chatwith with the Meta API.
Access Token (long-lived recommended)
For testing, the temporary access token on the WhatsApp → API Setup page works, but it expires in 24 hours. For production, generate a long-lived System User token:
- Go to business.facebook.com → Business Settings → Users → System Users.
- Create a system user (or use an existing one) with Admin access.
- Click Add Assets, choose Apps, add your Meta app, and grant Full control.
- Click Add Assets again, choose WhatsApp Accounts, add your WhatsApp Business Account, and grant Full control.
- Click Generate New Token, select your app, and check both:
whatsapp_business_messagingwhatsapp_business_management
- Set the expiry to Never if available, then copy the token.
App Secret
- In your Meta app dashboard, go to App Settings → Basic.
- Find the App Secret field and click Show.
- Re-enter your password if prompted, then copy the value.
Step 5 — Paste credentials into Chatwith and connect
- Back in Chatwith's WhatsApp integration form, paste your WhatsApp Access Token and Facebook App Secret into the matching fields.
- Click Add to WhatsApp.
- A Meta sign-in window will open. Sign in with the same Meta account that owns your Business Account, then:
- Select the WhatsApp Business Account you want to connect.
- Select the phone number your agent should reply from. (You can register a new number here if you don't have one yet — Meta will send a verification code by SMS or voice call.)
- Approve the connection.
Once Meta closes the window, your number is linked. Chatwith will start receiving and responding to messages sent to that WhatsApp number.
Step 6 — Test it
- Send a message to your connected WhatsApp number from another phone.
- You should see your agent reply within a few seconds.
- The same conversation appears in your Chatwith dashboard under Conversations, where you can review the transcript or take over the chat as a human agent.
Troubleshooting
"The callback URL or verify token couldn't be validated." Make sure you copied the entire Webhook Callback URL and Verify Token from Chatwith with no trailing spaces. Both values are case-sensitive.
Messages aren't reaching the agent.
Check that you subscribed to the messages webhook field in Meta (Step 3, item 6). Without that subscription, Meta never forwards messages.
"Invalid OAuth access token." Your access token may have expired (the temporary one lasts 24 hours). Generate a long-lived System User token following Step 4 and paste the new value.
The agent replies, but messages are sent from a different number than expected. In the Add to WhatsApp flow (Step 5), make sure you selected the correct phone number. You can repeat the flow to switch to a different number.
I want to use my existing business phone number. You can migrate a number from the WhatsApp consumer or WhatsApp Business app into the WhatsApp Cloud API. Meta's docs cover this under "Migrate an existing WhatsApp number to a Business Account." After migration, complete Step 5 to register that number with your Chatwith Agent.
What's next
- Customize the agent's tone and answers from the Knowledge and General settings.
- Set up Human Escalation so customers can ask to be transferred to a team member when the bot can't help.
- Watch conversations live in the dashboard and step in as a human agent whenever you need to.
If you get stuck on any step, reach out to support and include the exact error message Meta showed you — that usually pinpoints the issue immediately.
More from our blog
Spell trains ChatGPT on their website to get 93% less support emails
Learn how Spell AI has trained a Chatwith Agent on their website content to improve their customer support while decreasing the costs.
Automate customer support using an agent with integrations
Automate your business. Go beyond Q&A by connecting your Chatwith Agent to 6000+ services for tasks like scheduling events, CRM updates, and more.

