# Research: WhatsApp SDK/API for Annie

**Date:** 2026-04-06
**Status:** RESEARCHED — decision needed

## Context

Annie uses Telegram Bot API for bidirectional messaging. Can we do the same with WhatsApp?

## Options Evaluated

### 1. WhatsApp Business Cloud API (Official Meta)
- **Personal number?** NO — needs a new number not registered on WhatsApp
- **Incoming messages:** Webhooks (HTTP POST)
- **Ban risk:** None (official)
- **Python SDK:** PyWa (excellent, FastAPI-native)
- **Cost:** Free for customer-initiated; ~₹0.5-5/msg for templates
- **Self-hosted:** No (Meta cloud)
- **Verdict:** Best long-term option. Needs a second number.

### 2. WAHA (Self-Hosted REST API)
- **Personal number?** YES
- **Incoming messages:** Webhooks
- **Ban risk:** MEDIUM (uses unofficial Web/NOWEB engines underneath)
- **Python SDK:** REST API (HTTP calls)
- **Cost:** Free (Docker)
- **Self-hosted:** Yes
- **Verdict:** Middle ground. Ban risk is real but lower than raw Baileys.

### 3. Baileys / whatsapp-web.js (Reverse-Engineered)
- **Personal number?** YES
- **Ban risk:** VERY HIGH — WhatsApp aggressively banning in 2025
- **Python SDK:** None (Node.js only)
- **Verdict:** DO NOT USE. Multiple reports of accounts banned even for reply-only usage.

### 4. ADB Automation (Current Approach)
- **Personal number?** YES
- **Incoming messages:** Polling only (no webhooks)
- **Ban risk:** None (real UI interaction)
- **Python SDK:** uiautomator2
- **Verdict:** Zero ban risk but too slow/fragile for production messaging.

### 5. WhatsApp MCP Servers (Community)
- All use unofficial backends (Baileys/Web.js) → same ban risks
- None wrap the official Cloud API
- **Verdict:** Not recommended.

## Key Insight

Unlike Telegram (built for bots), WhatsApp actively fights automation. No `@BotFather` equivalent for personal accounts. SMS Retriever API for OTP is the same anti-automation philosophy.

## Recommendation

**Get a second number for WhatsApp Cloud API:**
- Personal number (Pixel) → human-facing (calls, manual chats)
- Business number (Cloud API) → programmatic messaging with Rajesh, same pattern as Telegram

Options for second number: virtual SIM, cheap Airtel prepaid, or Twilio/Vonage virtual number.

## Decision Needed

1. Accept second number approach? Or try WAHA with ban risk?
2. If second number: virtual (Twilio) or physical SIM?
