WhatsApp API for AI agents: official access in minutes, without becoming a Tech Provider
An AI agent gets official WhatsApp access through Meta's Cloud API, and a number that stays in the WhatsApp Business app joins it through a Tech Provider or Solution Partner. You can become one, with business verification, App Review videos and an Embedded Signup build, or connect through a provider that already is: the number joins in minutes and the agent gets MCP tools or API credentials.
easyCoexistence is an independent Meta Tech Provider: it connects a WhatsApp Business number to the Cloud API through Coexistence in minutes, so your agent gets official access while the business keeps the app.
What Meta requires of whoever onboards a number that stays in the WhatsApp Business app: Tech Provider or Solution Partner status.
App Review asks for one video of a message sent from your app, and one of your app creating a template.
What App Review grants to whatsapp_business_messaging and whatsapp_business_management, both required to become a Tech Provider.
When Meta deprecated Embedded Signup v2 and v3, telling integrations to move to v4.
Fixed throughput of a number in use with both the WhatsApp Business app and Cloud API.
How long a hosted connect link stays valid when a platform onboards a customer's number through the Partner API.
What does an AI agent need to use WhatsApp officially?
Four things from Meta's Cloud API. A phone number ID and an access token with the whatsapp_business_messaging permission, so the agent can call the messages endpoint. A webhook endpoint where Meta delivers incoming messages, plus, on a number shared with the app, smb_message_echoes for the replies a person types on the phone. Approved templates, because a typed message reaches only someone who wrote in the last 24 hours. And a way to know when the connection breaks, since the app on the phone keeps working when the API side stops.
The shortcut people find first is WhatsApp Web automation, which signs in as a linked device. That breaks WhatsApp's terms and puts the number at risk of a ban, whatever the agent on top of it does.
What does the Tech Provider route involve?
Meta's own sequence, in this order. Each step is free, and none can be bought faster: the reviews run on Meta's schedule and Meta publishes no timeline, so plan for weeks rather than days before the first customer's number connects. After that the backend has to keep running: the token exchange after each signup, a webhook receiver, routing per number, and monitoring for disconnections such as Meta's 14-day inactivity rule.
What is the shorter route?
Connect the number through a provider that already went through that process. With easyCoexistence, the business runs Meta's Embedded Signup and scans a code with the WhatsApp Business app, which takes about two minutes, and the number joins the Cloud API in the business's own portfolio while the app keeps working. The agent then gets access in whichever form it speaks: MCP tools for an assistant such as ChatGPT, Claude, Claude Code or Codex, or the number's credentials and webhooks for code you run.
| Connect through easyCoexistence | Become a Tech Provider | |
|---|---|---|
| Meta app and App Review | Not needed: the number joins through ours | Yours to build and pass |
| Embedded Signup | Hosted, with the QR scan in the app | You integrate version 4 and host the flow |
| First number connected | Minutes after signing up | After verification and review |
| Webhook trust | A secret in your URL, or X-EC-Signature on forwarded messages | Your app secret signs Meta's deliveries |
| Disconnection alerts | Every number watched 24/7, 14-day rule included | Monitoring you build and run |
| Who owns the WhatsApp Business Account | The business, in its own portfolio | The business |
How does the agent get the number's credentials?
Through get_api_credentials, or from the number's page in the dashboard. The tool returns the Graph API base URL, the WhatsApp Business Account ID, the phone number ID, the send endpoint and, when one exists, the business's own access token, scoped to its WhatsApp assets. When no client token was issued, the token comes back null with a note that reconnecting the number from the dashboard issues one, without replacing a token that works. There is no app secret to fetch, because Meta signs webhooks with easyCoexistence's app secret, which is never shared. The tool needs an active plan, since the token can send.
curl -X POST "$SEND_ENDPOINT" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"messaging_product": "whatsapp",
"to": "5511999998888",
"type": "text",
"text": { "body": "Your order #1042 is ready for pickup." }
}'How do incoming messages reach the agent?
Each number has two modes, switched with set_inbound_mode or on the number's page. Direct to your server: set_webhook_destination points Meta straight at your HTTPS endpoint, which must answer Meta's GET handshake, and easyCoexistence never sees the messages, so automations are off. Because Meta signs those deliveries with our app secret, put a long random secret in the URL path and reject requests without it.
Automations on: Meta delivers to easyCoexistence, automations can answer, and an optional Forward URL receives Meta's original payload under "value", signed with X-EC-Signature: t=<unix>,v1=<HMAC-SHA256 of "<t>.<body>"> using a secret shown once. An automation's Call my webhook step also hands the message and the chat's last 10 messages to your agent, and sends its reply when your answer is {"reply": "..."} within 20 seconds.
Which limits does the agent have to respect?
Meta's, and they are the same through any provider. An agent that knows them ahead of time avoids the failures that look like bugs:
- 20 messages per second per number, fixed by Meta for numbers shared with the WhatsApp Business app.
- Typed messages only within 24 hours of the customer's last message; after that, an approved template.
- Templates go out through the API only, because the app on a Coexistence number cannot send them.
- Replies a person types in the app arrive as
smb_message_echoes; pause the agent on that chat, or the customer gets two answers. - Group chats are not synchronized to the API, so the agent works in one-to-one chats.
- Contacts and up to 6 months of one-to-one chats import once, only if a direct webhook destination is saved within 24 hours of connecting; a number with automations on does not get the import.
- Voice and video calls keep working in the app, but the Cloud API does not carry calls on a Coexistence number, so the agent works in text.
Can a platform connect its own customers' numbers this way?
Yes, through the Partner API, which is how a SaaS or an agency onboards its customers without Tech Provider status of its own. Create the key with create_api_key (it starts with ec_live_ and is shown once), then call POST /api/v1/connect-sessions from your backend, or create_connect_link from the assistant, for a hosted link valid 1 hour. The customer runs Meta's popup and the QR scan there and returns to your redirect_url with a connection_id. GET /api/v1/connections/:id?credentials=1 then returns the customer's own token, and status events such as connection.disconnected arrive signed with X-EC-Signature. Each number is billed to your account at the same per-number bands.
Common mistakes
- Validating X-Hub-Signature-256 on a direct destination. Meta signs with easyCoexistence's app secret, which is never shared, so genuine deliveries fail the check; trust a long random secret in the URL, or use forwarding with X-EC-Signature.
- Receiving with n8n's WhatsApp Trigger node. It expects your own Meta app; use the generic Webhook node with a secret in its URL instead.
- Ignoring smb_message_echoes. The agent then answers on top of a person who already replied from the phone, and the customer reads two answers.
- Saving the direct webhook destination days after connecting, or leaving the number on automations. Meta's one-time import of contacts and up to 6 months of chats needs a direct destination saved within 24 hours of the connection.
The agent works through more than 30 MCP tools or through the credentials and webhooks of each number, and every number is monitored 24/7 with alerts. US$ 9 down to US$ 0.75 per number per month, falling as you add numbers, with the first 3 days free.
easyCoexistence is a multichannel API and MCP server that connects AI agents such as Claude and ChatGPT to WhatsApp, Instagram, TikTok, Facebook and more. On WhatsApp it uses Coexistence: the business keeps using its number in the WhatsApp Business app while the AI works through Meta's official API.
Frequently asked questions
Do I need my own Meta app?
No. The number is onboarded through easyCoexistence's Meta app and stays in the business's own portfolio and WhatsApp Business Account. Your code sends with the business's own token from get_api_credentials, so no app of yours is involved unless you later build one.
Can the agent and the team use the number at the same time?
Yes. Meta mirrors messages between the Cloud API and the WhatsApp Business app, so what the agent sends appears in the app's chat thread on the phone, and what the team types in the app reaches your system as smb_message_echoes.
Which agent frameworks work with it?
Any client that speaks MCP over HTTP with OAuth, such as ChatGPT, Claude, Claude Code, Codex and Cursor, and any code that calls Meta's Graph API: Node.js, Python, n8n, LangChain, the OpenAI Agents SDK or the Vercel AI SDK. The API underneath is Meta's own, so nothing proprietary sits inside the agent.
Is a general-purpose AI assistant allowed on WhatsApp?
Meta's Business Solution Terms, section 4.7, bar providers of general-purpose AI assistants from offering them on the WhatsApp Business Platform where the AI is the primary functionality, as Meta determines, in force since January 15, 2026. A business using AI for its own customers, for support, sales or bookings, is not the target, and regulators in the EU and Brazil have ordered Meta to suspend or roll back the rule for rival assistants.
Keep reading
Ready to get started?
Set up WhatsApp Coexistence in minutes, not months. The app keeps working on the phone.
Start Free TrialVerified on