ArgentOSDocs

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.

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.

Prerequisites

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

Step 1: Add the Channel

argent channels add whatsapp

Step 2: 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).

Configuration

{
  "channels": {
    "whatsapp": {
      "enabled": true,
      "allowedNumbers": [],
      "sessionPath": "~/.argentos/whatsapp-session"
    }
  }
}

Restricting Access

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

{
  "allowedNumbers": ["+15551234567", "+15559876543"]
}

Supported Features

FeatureSupported
Text messagesYes
ImagesYes
DocumentsYes
Voice messagesPartial
Group chatsPartial
Status updatesNo

Known Limitations

  • Session persistence: The WhatsApp Web session may expire after extended periods. Re-scan the QR code if the connection drops.
  • Rate limiting: WhatsApp may temporarily ban accounts that send too many messages too quickly. Keep automated responses reasonable.
  • No official API: This uses an unofficial bridge. WhatsApp's terms of service should be reviewed for your use case.