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

# WhatsApp

> Connect your agent to WhatsApp so it can send and receive messages

Your agent can have direct conversations with people over WhatsApp — receiving messages and responding in natural conversation, just like in the portal. Each person who messages the WhatsApp number gets their own ongoing 1:1 chat with the agent.

## Example use cases

* A customer support agent that handles inquiries via WhatsApp 24/7
* A booking assistant that confirms appointments through WhatsApp messages
* An internal helper that team members can reach from their phone without opening the portal

## Prerequisites

* A Meta (Facebook) developer account
* A phone number to register with WhatsApp Business (can be new or existing)
* The Abundly agent you want to connect

## How to connect

<Steps>
  <Step title="Create a Meta App">
    Go to [developers.facebook.com](https://developers.facebook.com), create a new app, and add the **WhatsApp** product. This gives you a test phone number and API access.
  </Step>

  <Step title="Create a System User and generate a permanent token">
    In [Meta Business Settings](https://business.facebook.com/settings), go to **Users → System Users**, create one, and generate a token with these permissions:

    * `whatsapp_business_messaging`
    * `whatsapp_business_management`

    The temporary token from the API Setup panel expires hourly — the System User token is permanent.
  </Step>

  <Step title="Enable the WhatsApp capability">
    In the Abundly portal, open your agent's capabilities and enable **WhatsApp**. The settings panel shows your webhook URL, verify token, and a place to store your credentials.
  </Step>

  <Step title="Add your credentials">
    Create a WhatsApp secret with your **Phone Number ID** (from Meta's API Setup panel) and the **Access Token** you generated.
  </Step>

  <Step title="Configure the webhook in Meta">
    In your Meta App Dashboard under **WhatsApp → Configuration**, set the **Callback URL** and **Verify Token** shown in the capability panel. Then subscribe to the **messages** webhook field.
  </Step>

  <Step title="Publish the app">
    Under **App Settings → Basic**, fill in a privacy policy URL, app icon, and category, then click **Publish**. This switches the app to live mode so real messages are delivered to your webhook.

    <Note>
      Publishing does not make your app public — it just enables production webhook delivery.
    </Note>
  </Step>

  <Step title="Subscribe the app to your WABA">
    This step is sometimes needed if webhooks don't arrive after publishing. Call the Graph API to explicitly subscribe your app:

    ```bash theme={null}
    curl -X POST "https://graph.facebook.com/v21.0/YOUR_WABA_ID/subscribed_apps" \
      -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
    ```
  </Step>

  <Step title="Send a test message">
    Send a WhatsApp message to your registered number. You should see it arrive in the agent's activity.
  </Step>
</Steps>

## Access control

Only whitelisted phone numbers can message the agent. Add allowed numbers in the capability settings panel under **Allowed Senders** — the agent will ignore messages from anyone else.

<Note>
  WhatsApp enforces a 24-hour session window. After a user messages, the agent can reply freely for 24 hours. After that, only pre-approved template messages can be sent to initiate a new conversation.
</Note>

## Learn more

<CardGroup cols={2}>
  <Card title="Email & SMS" icon="envelope" href="/features/communication">
    Other messaging channels your agent can use
  </Card>

  <Card title="Slack" icon="slack" href="/integrations/slack">
    Connect your agent to Slack for team communication
  </Card>
</CardGroup>
