> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chatling.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# How to connect WhatsApp to Chatling

> Step-by-step guide to connecting your WhatsApp account to Chatling.

Connect your WhatsApp Business account to Chatling to automate conversations with an AI agent or chatbot. You can use a new phone number or connect the number you already use in the WhatsApp Business app.

## WhatsApp Coexistence

Chatling supports WhatsApp Coexistence, so an existing number can remain active in the WhatsApp Business app while also being used with Chatling. You do not need to delete your WhatsApp Business account, remove the number from the app, or get a new number.

After you connect your existing number:

* Your WhatsApp Business app remains active on your phone.
* Chatling can receive incoming messages and send AI replies from the same number.
* Messages that you send from the WhatsApp Business app appear in the corresponding conversation in Chatling.
* Your team can also view and reply to conversations from the Chatling dashboard.

This allows your team to combine the WhatsApp Business app's familiar mobile experience with Chatling's automation and team inbox.

## Before you connect

You can connect either a new phone number or an existing number from the WhatsApp Business app. The requirements depend on which option you choose.

In both cases, you must be able to sign in to the Facebook account that manages your Meta business portfolio, or create a business portfolio during setup.

**Existing WhatsApp Business number**

To use Coexistence:

* The number must be active in the WhatsApp Business app and it must not be used with the personal WhatsApp app.
* Install the latest version of the WhatsApp Business app.
* Have access to the phone where the number is signed in.

**New phone number**

If you choose to connect a new number, it must be able to receive a verification code by SMS or phone call.

## How to connect WhatsApp to Chatling

1. Start the WhatsApp connection from your AI agent or chatbot:
   * **AI Agent:** Open or [create a new AI Agent](https://docs.chatling.ai/ai-agent/getting-started.md), go to `Deploy`, and click `Setup` under WhatsApp.

![Start connection from AI agent](https://chatling-assets.b-cdn.net/setup-whatsapp-ai-agent.jpg)

* **AI Chatbot:** Create or open a WhatsApp chatbot and start the setup wizard.

2. Click `Login with Facebook`.

![Login with Facebook](https://chatling-assets.b-cdn.net/whatsapp-setup-login-with-facebook-button.jpg)

3. Sign in to your Facebook account.
4. You may see a screen like below. Click the `Continue` button.

![Continue with Facebook](https://chatling-assets.b-cdn.net/whatsapp-connection-intro-screen.jpg)

5. You'll be prompted to add your WhatsApp phone number. Click the Phone number dropdown and either select `Enter a new phone number` or choose an existing number from the list.
6. The remaining steps depend on the number you chose. Select the tab that matches your situation:

**Existing WhatsApp Business number (Coexistence)**

Follow these steps if the number is active in the WhatsApp Business app on your phone. Chatling connects it using WhatsApp Coexistence, so you can keep using the number in the WhatsApp Business app as well as Chatling.

1. Select `Enter a new phone number`, type in your existing WhatsApp Business number, and click `Next`.

![Enter phone number](https://chatling-assets.b-cdn.net/whatsapp-setup-coexistence-enter-new-phone-number.jpg)

2. Meta detects that the number is in use and displays your WhatsApp Business account details. Click `Next`.

![Existing number details](https://chatling-assets.b-cdn.net/whatsapp-setup-coexistence-verify-account-info.jpg)

3. Create a new business portfolio or choose an existing one, then click `Next`. If you choose to create a new one, enter the information that Meta requests.

![Create business portfolio](https://chatling-assets.b-cdn.net/whatsapp-setup-coexistence-choose-business-portfolio.jpg)

4. Because your number is already in use in the WhatsApp Business app, Meta asks you to confirm that you own it by scanning a QR code like the one below.

   Open the WhatsApp Business app on your phone and scan the code using the camera inside WhatsApp, not your phone's camera app. Alternatively, WhatsApp sends you a message with a link that opens the scanner directly.

   ![Verify account QR code](https://chatling-assets.b-cdn.net/whatsapp-setup-coexistence-connection-qr-code.jpg)

5. Once you scan, it will display a confirmation screen on your device. Click `Connect to the Business Platform`.

![Connect to business platform](https://chatling-assets.b-cdn.net/whatsapp-business-app-connect-business-platform.jpg)

6. Choose whether to share your chat history, then click `Confirm`. Chatling doesn't import past chats, so you can choose to not share them.

![Share chat history](https://chatling-assets.b-cdn.net/whatsapp-setup-coexistence-choose-chat-history-sharing.jpg)

7. WhatsApp will open the QR code scanner. Scan the same QR code again to confirm the connection.

8. Once connected succesfully, you will see a confirmation screen like below. Click `Finish setting up in Chatling`.

![Finish setting up in Chatling](https://chatling-assets.b-cdn.net/whatsapp-setup-coexistence-app-finish-setting-up-button.jpg)

9. Return to the Meta setup window on your computer and you should see a confirmation screen. Click `Next`.

![Confirm business connection in Chatling](https://chatling-assets.b-cdn.net/whatsapp-setup-coexistence-confirm-whatsapp-business-account.jpg)

10. Review the information and confirm the connection by clicking the `Confirm` button.

![Confirm business connection](https://chatling-assets.b-cdn.net/whatsapp-setup-coexistence-review-and-confirm-whatsapp-connection.jpg)

11. Meta will take a few seconds to complete the connection. Once done, you will see a confirmation screen. Click `Finish`.

![Confirm business connection](https://chatling-assets.b-cdn.net/whatsapp-setup-coexistence-whatsapp-connection-completed-dialog.jpg)

12. Go back to Chatling and you should see it processing the connection. Once completed, it will display a success message. Click `Close`.

![Confirm business connection in Chatling](https://chatling-assets.b-cdn.net/whatsapp-setup-coexistence-chatling-confirmation.jpg)

Your number is now connected to Chatling and you can start using it to send and receive messages.

**New phone number**

Use this if the number is not connected to WhatsApp Business.

1. Select `Enter a new phone number` and type in the number.

![Enter phone number](https://chatling-assets.b-cdn.net/whatsapp-setup-coexistence-enter-new-phone-number.jpg)

2. Enter the verification code sent by SMS or phone call and click `Next`.
3. Select `Create a Business Portfolio` or choose an existing portfolio if you already have one.

   For `WhatsApp Account`, select `Create a new WhatsApp account` if you don't have one already created, or choose an existing one from the list.

![Choose or create business portfolio](https://chatling-assets.b-cdn.net/whatsapp-setup-choose-business-portfolio.jpg)

4. Enter your business information and click `Next`.

![Enter business information](https://chatling-assets.b-cdn.net/whatsapp-setup-enter-business-information.jpg)

5. Enter your WhatsApp Business display name and click `Next`. Make sure the name follows [WhatsApp's guidelines](https://developers.facebook.com/docs/whatsapp/guides/display-name/).

![Enter display name](https://chatling-assets.b-cdn.net/whatsapp-setup-enter-display-name.jpg)

6. Review the information and click `Confirm`.

![Review and confirm connection](https://chatling-assets.b-cdn.net/whatsapp-setup-review-confirm-connection.jpg)

7. Meta will take a few seconds to complete the connection. Once done, you will see a confirmation screen. Click `Finish`.

![Confirm business connection](https://chatling-assets.b-cdn.net/whatsapp-setup-coexistence-whatsapp-connection-completed-dialog.jpg)

7. Return to Chatling. It will take a few seconds to process the authentication. Once successful, you'll be asked to create a six-digit PIN to register the number with WhatsApp. Save this PIN, as you'll need it if you ever reconnect the number.
   * If you've already set a PIN for this number, enter the same one.
   ![Set PIN](https://chatling-assets.b-cdn.net/whatsapp-setup-enter-2fa-pin.jpg)
8. Chatling will take a few seconds to register the phone number. Once successful, you'll see a confirmation message. Click `Close` to complete the setup.

![](https://chatling-assets.b-cdn.net/whatsapp-setup-connection-successful-confirmation.jpg)

Your WhatsApp account is now setup and connected to Chatling. You can start using it to send and receive messages.

## After connecting

Send a test message to your business number from a different WhatsApp account. The message should appear in Chatling, and your AI agent or chatbot should respond according to its configuration.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.