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 whatsappStep 2: Pair via QR Code
The CLI will display a QR code in your terminal. Scan it with WhatsApp:
- Open WhatsApp on your phone
- Go to Settings > Linked Devices
- Tap Link a Device
- 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
| Feature | Supported |
|---|---|
| Text messages | Yes |
| Images | Yes |
| Documents | Yes |
| Voice messages | Partial |
| Group chats | Partial |
| Status updates | No |
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.