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

# WhatsApp

> Connect ArgentOS to WhatsApp using the WhatsApp Web bridge.

## Overview

ArgentOS connects to WhatsApp through a WhatsApp Web bridge. This approach uses the same protocol as WhatsApp Web in your browser, so no Business API account is needed.

<Warning>
  WhatsApp Web bridge connections can be less stable than native API integrations like Telegram or Discord. The connection may drop and require re-pairing periodically.
</Warning>

## Prerequisites

* A phone with WhatsApp installed and an active account
* ArgentOS gateway running

## Setup

<Steps>
  <Step title="Add the Channel">
    ```bash theme={null}
    argent channels add whatsapp
    ```
  </Step>

  <Step title="Pair via QR Code">
    The CLI will display a QR code in your terminal. Scan it with WhatsApp:

    1. Open WhatsApp on your phone
    2. Go to **Settings > Linked Devices**
    3. Tap **Link a Device**
    4. Scan the QR code shown in your terminal

    Once paired, the bridge maintains the connection. Your phone does not need to stay online after initial pairing (multi-device support).
  </Step>
</Steps>

## Configuration

```json theme={null}
{
  "channels": {
    "whatsapp": {
      "enabled": true,
      "allowedNumbers": [],
      "sessionPath": "~/.argentos/whatsapp-session"
    }
  }
}
```

### Restricting Access

Use `allowedNumbers` to restrict which phone numbers can interact with the agent:

```json theme={null}
{
  "allowedNumbers": ["+15551234567", "+15559876543"]
}
```

## Supported Features

| Feature        | Supported |
| -------------- | --------- |
| Text messages  | Yes       |
| Images         | Yes       |
| Documents      | Yes       |
| Voice messages | Partial   |
| Group chats    | Partial   |
| Status updates | No        |

## Known Limitations

<AccordionGroup>
  <Accordion title="Session persistence">
    The WhatsApp Web session may expire after extended periods. Re-scan the QR code if the connection drops.
  </Accordion>

  <Accordion title="Rate limiting">
    WhatsApp may temporarily ban accounts that send too many messages too quickly. Keep automated responses reasonable.
  </Accordion>

  <Accordion title="No official API">
    This uses an unofficial bridge. WhatsApp's terms of service should be reviewed for your use case.
  </Accordion>
</AccordionGroup>
