waiaconnect

Migrate from Baileys, Evolution API or whatsapp-web.js to the official WhatsApp API (without losing your number)

Short answer: with Coexistence you connect the same number to Meta's official Cloud API and it keeps working in the WhatsApp Business app on the phone, with its chats. You can also import up to 6 months of history when connecting, if you choose it. What changes: business-initiated messages need approved templates, free-form replies only within 24 hours of the customer's last message, and Meta charges per message.

The risks of unofficial libraries, without exaggerating

Baileys, Evolution API, whatsapp-web.js and similar tools connect through the WhatsApp Web protocol. They work, they are free, and for a disposable number they can be a reasonable choice. The risks, when the number is your business's:

  • The number. Meta can take down numbers that use these connections, with no prior notice and no public criteria.
  • Breakage. It is reverse engineering: a WhatsApp update can break it without warning.
  • A linked session. Everything depends on a phone session staying open.

More detail: is it safe to use an unofficial library?

What you keep

  • The number, the same one your customers already have.
  • The WhatsApp Business app on the phone and its chats: with Coexistence nothing on the phone is deleted or moved, and the business keeps answering from there.
  • The history, if you choose it when connecting: up to 6 months, messages from both sides, no groups, delivered by webhook (history.batch) or by API. Meta shares it only once, at connection time (how it works).

What changes

  • Templates. To start a conversation (or write after 24 hours) you send a template approved by Meta (templates).
  • The 24-hour window. Free-form messages only within 24 hours of the customer's last message (the 24-hour window).
  • Meta's costs. Meta charges per message by category, directly to the business's card; service conversations have a free allowance (costs). WAIA Connect charges a flat monthly plan per number, with no per-message fee.
  • Business verification and a Meta account: the WhatsApp Business Account stays in the name of the business.

The migration, step by step

  1. Check the number: it must be on the WhatsApp Business app (not the personal WhatsApp) and not connected to another API. Coexistence is not available in every country.
  2. Close the unofficial session (log out the linked device used by Baileys / Evolution API / whatsapp-web.js) so two connections don't fight over the number.
  3. Connect the number with Coexistence from the WAIA Connect dashboard, with Meta's signup (Embedded Signup); decide there whether you want the history (the connection guide).
  4. Point your code at the API: sending becomes POST /v1/messages with an Idempotency-Key; receiving becomes a signed webhook (message.received, message.status, and message.echo for what the business sends from the phone) (receive the webhook).
  5. Create your templates for the messages your system initiates, and wait for Meta's approval.
  6. Make one test send from the dashboard and then switch traffic.

If you come from another provider (360dialog, Twilio, Gupshup, Wati…)

Before connecting: remove the previous provider's app from your Meta account, add your own card in Meta and make one test send. Only if it still fails, ask the previous provider to revoke its line of credit; otherwise the number receives but Meta rejects every send. The full steps, with the real case: move my number from another provider and migrating from another provider in the docs. If you used your own Meta app: from your own Cloud API to Coexistence.

Questions

Do I lose my number when moving from Baileys or Evolution API to the official API?

No. With Coexistence you connect the same number to the Cloud API and it keeps working in the WhatsApp Business app on the phone.

Do I lose the chats on the phone?

No. With Coexistence nothing on the phone is deleted or moved. If you choose it when connecting, you can also receive up to 6 months of history in your system, once.

What changes compared to an unofficial library?

Business-initiated messages need approved templates, free-form messages only within 24 hours of the customer's last message, and Meta charges per message by category, directly to the business.

Can I migrate a personal WhatsApp number?

Coexistence works with numbers on the WhatsApp Business app. A personal WhatsApp number first has to move to the WhatsApp Business app.

Connect your first number today

Meta-verified technology provider. Coexistence in one click.

Get started