WABridge
A lightweight WhatsApp HTTP Bridge.
Link your WhatsApp via CLI, then send messages through a simple REST API. Supports text, images, video, audio, documents — to individuals, groups, and channels.
$ npm install -g wabridgeOr run directly: npx wabridge
How It Works
WABridge sits between your applications and WhatsApp, routing messages through a local HTTP server.
Loading diagram...
Your App sends HTTP requests to WABridge, which delivers them to WhatsApp.
Simple REST API
One POST request to send a message. No complex SDKs or auth flows required.
Rich Media
Send images, videos, voice notes, and documents. Supports URLs and local file paths.
Groups & Channels
Send to individuals, groups, and channels. List groups with their JIDs programmatically.
Self-Hosted
Runs on your machine. No third-party cloud services. Your messages stay local.
Python SDK
Send messages from Python with one function call. Sync and async support built in.
Interactive CLI
Test messages interactively from the terminal. Link via QR code or pairing code.
Quick Start
Link WhatsApp
QR Code (default):
$ wabridge # Scan the QR code with WhatsApp # Settings > Linked Devices > Link a Device
Pairing Code (alternative):
$ wabridge --code # Enter your phone number and get an 8-digit pairing code
Auth is saved to ~/.wabridge/ — you only need to link once.
Start the API Server
$ wabridge start WABridge server running on port 3000
Custom port: wabridge start 8080
Send Messages
Using curl:
$ curl -X POST http://localhost:3000/send \ -H 'Content-Type: application/json' \ -d '{"phone": "919876543210", "message": "BUY NIFTY 24000 CE @ 150"}'
Using Python:
$ pip install wabridge from wabridge import WABridge wa = WABridge() wa.send("919876543210", "BUY NIFTY 24000 CE @ 150")
API Endpoints
/groupsList all WhatsApp groups with their JIDs
{ "groups": [{ "id": "[email protected]", "subject": "Trading Alerts" }] }/sendSend text, image, video, audio, or document
{ "phone": "919876543210", "message": "BUY NIFTY 24000 CE @ 150" }/send/selfSend a message to yourself
{ "message": "Portfolio P&L: +5000" }/send/groupSend a message to a WhatsApp group
{ "groupId": "[email protected]", "message": "NIFTY crossed 25000!" }/send/channelSend a message to a WhatsApp channel
{ "channelId": "120363098765@newsletter", "message": "Market closed." }Message Content Fields
All send endpoints accept these content fields:
| Field | Type | Description |
|---|---|---|
| message | string | Text message |
| image | URL or file path | Image with optional caption |
| video | URL or file path | Video with optional caption |
| audio | URL or file path | Voice note or audio file |
| document | URL or file path | Document attachment |
Use Cases
Trading Alerts
wa.send("BUY NIFTY 24000 CE @ 150")Send Chart Images
wa.send("91...", image="url", caption="NIFTY")Group Portfolio Updates
wa.send_group("[email protected]", "P&L: +5000")Send P&L Reports
wa.send("91...", document="pnl.pdf")Broadcast Market Alerts
wa.send([(n, "NIFTY 25000!") for n in nums])Price Monitoring
if price > 25000: wa.send(f"Alert: {price}")Requirements
Node.js >= 20.0.0
For the WABridge server
Python >= 3.8
For the Python SDK (optional)
Built on Baileys. MIT Licensed.