# Connect your Agent with WhatsApp

Connecting your Text Agent to WhatsApp lets it respond to customers directly through WhatsApp Business. Once connected, your agent will handle conversations automatically using the instructions and knowledge you've configured.

## Prerequisites

**If connecting a Dapta phone number:**

* **A Dapta Text Agent** already created and configured.
* **A phone number** already purchased in the **Phone Numbers** section of Dapta.

**If connecting your own phone number:**

* **A Dapta Text Agent** already created and configured.
* **A phone number** that is **not** already registered with another WhatsApp account.
* **Access to the phone number** to receive a verification code via SMS.
* **Pop-ups allowed** in your browser for the Dapta site.
* **A valid business website or Instagram Business profile URL** — Meta requires this to avoid blocks on your WhatsApp Business Account.

{% hint style="warning" %}
If you want to use a number that is currently linked to a regular WhatsApp account, you must deregister it first. For WhatsApp API numbers, remove it from your Meta Business portfolio. For personal WhatsApp, go to **Settings → Account → Delete account**. Note that deregistering will permanently delete all conversation history on that number.
{% endhint %}

***

## Step-by-Step Guide

**Step 1:** You can access WhatsApp setup in two ways:

* **From the sidebar:** Expand **Text Agents** in the left sidebar and click **Channels**, then click on the **WhatsApp Business** card.
* **From inside an agent:** Go to **Text Agents**, click on the agent you want to connect, and open the **Channels** tab at the top.

<figure><img src="/files/pdzvmXQvEjjU68tM4kLq" alt="Text Agents list showing your available agents"><figcaption></figcaption></figure>

***

**Step 2:** You will see two channel options: **WhatsApp Business** and **Dapta Widget**. Click the **Connect** button on the **WhatsApp Business** card.

<figure><img src="/files/KK1QTbBh2hPyfizytpSL" alt="Channels tab showing WhatsApp Business and Dapta Widget cards"><figcaption></figcaption></figure>

***

**Step 3:** A modal will appear asking **"Choose how to connect your number."** Select one of the two options:

* **Use a Dapta number** — Connect one of your purchased Dapta phone numbers.
* **Use my own number** — Connect a phone number you already own.

<figure><img src="/files/fVIf9oMEeGIRnYtqXvcc" alt="Modal asking whether to use a Dapta number or your own number"><figcaption></figcaption></figure>

Click **Next** to continue.

***

## Path A: Use a Dapta Number

**Step 4:** Fill in the following fields:

* **Display Name** — The name your customers will see on WhatsApp when your agent messages them (e.g., "Acme Support").
* **Select a Dapta number** — Choose from the dropdown of phone numbers you have already purchased in Dapta.

<figure><img src="/files/HzW8uweaLTxZJ7mwXcHz" alt="Form showing Display Name field and Select a Dapta number dropdown"><figcaption></figcaption></figure>

Click **Continue**.

***

**Step 5:** What happens next depends on whether your account already has a WhatsApp Business Account (WABA) linked:

* **If you already have a WABA linked:** Dapta connects the number automatically. You will see a success screen — no Meta popup required.
* **If this is your first time:** A Meta popup will open. You only need to select your **Business Portfolio** and your **WhatsApp Account** — no phone number entry, display name, or verification code is required in the Meta flow.

{% hint style="info" %}
If the Meta popup does not appear, make sure pop-ups are allowed for `app.dapta.ai` in your browser settings.
{% endhint %}

***

**Step 6:** Once the connection is complete you will see a success screen. Click **Done** to finish.

***

## Path B: Use Your Own Number

**Step 4:** The following fields are required before Dapta opens the Meta connection:

* **Display Name** — The name your customers will see on WhatsApp.
* **Website** — A valid business website or Instagram Business profile URL (required by Meta).
* **Phone Number** — Select your country code and enter the phone number you want to connect.

<figure><img src="/files/STSTFhNvBUIRWoRKqUbE" alt="Form showing Display Name, Website, and Phone Number fields"><figcaption></figcaption></figure>

{% hint style="warning" %}
The phone number must not be registered with another WhatsApp account. See the Prerequisites section above if you need to deregister it first.
{% endhint %}

Click **Continue**.

***

**Step 5:** A **Meta Embedded Signup** popup will open in a new browser window. Follow the steps to:

1. Log in to your Facebook/Meta account.
2. Create or select a **Meta Business Account**.
3. Create or select a **WhatsApp Business Account (WABA)**.

{% hint style="info" %}
If the popup doesn't appear, make sure pop-ups are allowed for this site in your browser settings.
{% endhint %}

***

**Step 6:** Once the Meta signup is complete, the popup will close automatically and Dapta will register your WhatsApp sender. You will see a **success screen** confirming your connection.

Click **Done** to finish.

***

## After Connecting

Once connected, the WhatsApp Business card on the **Channels** tab will show:

* A **status badge** (e.g., `ONLINE`, `CREATING`, `OFFLINE`) in the top-right corner of the card.
* A **View Connection** button instead of the Connect button.

Clicking **View Connection** opens a details panel where you can see:

| Field               | Description                                               |
| ------------------- | --------------------------------------------------------- |
| **Phone Number**    | The connected WhatsApp number                             |
| **Status**          | Current connection status (Online, Offline, etc.)         |
| **WABA ID**         | Your WhatsApp Business Account ID                         |
| **Quality Rating**  | Meta's quality rating for your number (High, Medium, Low) |
| **Messaging Limit** | Your current messaging tier                               |
| **Sender ID**       | The Twilio sender identifier                              |

{% hint style="info" %}
Your agent will start responding to WhatsApp messages automatically once the status shows **ONLINE**. It may take a few moments after connecting for the status to update.
{% endhint %}

***

## Connecting via the Phone Numbers Section

You can also connect or view a WhatsApp line directly from the **Phone Numbers** section, without going through the agent's Channels tab:

1. In the left sidebar, expand **Voice Agents** and click **Phone Numbers**.
2. Click on any phone number in the list to open its detail panel.
3. Scroll to the **Text Agents** section at the bottom of the panel.
4. If no WhatsApp is connected, click **Connect WhatsApp** and follow the same steps above.
5. If a WhatsApp line is already connected, the panel shows the **Display Name** (read-only) and the text agent assigned to that number.

***

## Troubleshooting

| Issue                                   | Solution                                                                                                            |
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| Meta popup is blocked                   | Allow pop-ups for `app.dapta.ai` in your browser settings and try again                                             |
| Phone number already registered         | Deregister the number from your existing WhatsApp account first                                                     |
| Verification code not received          | Click **Resend Code** and check that you have signal on the phone number                                            |
| Connection stuck on "Creating"          | Wait a few minutes — the registration can take up to 60 seconds. If it persists, try disconnecting and reconnecting |
| Meta requires business verification     | Make sure your Meta Business Account has a valid website or Instagram Business profile URL configured               |
| No Dapta numbers appear in the dropdown | Purchase a phone number first in **Voice Agents → Phone Numbers**                                                   |

If you have any doubts or questions about how official Meta business accounts work, you can review [Meta documentation](https://developers.facebook.com/documentation/business-messaging/whatsapp/official-business-accounts/)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dapta.ai/ai-text-agents/channels/connect-your-agent-with-whatsapp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
