npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

wabridge

v1.0.4

Published

WhatsApp HTTP Bridge - Send WhatsApp messages via API

Readme

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.

Install

npm install -g wabridge

Or run directly:

npx wabridge

Quick Start

1. Link WhatsApp

QR Code (default):

wabridge

Scan the QR code with WhatsApp (Settings > Linked Devices > Link a Device).

Pairing Code:

wabridge --code

Enter your phone number and get an 8-digit pairing code. Go to WhatsApp > Linked Devices > Link a Device > Link with phone number.

Once linked, you can test messages interactively:

Commands: /send, /self, /groups, /sendgroup, /sendchannel, /status, /disconnect, /quit

Auth is saved to ~/.wabridge/ — you only need to link once.

2. Start the API Server

wabridge start

With a custom port:

wabridge start 8080

API Endpoints

Check Status

curl http://localhost:3000/status
{ "status": "open", "user": "[email protected]" }

List Groups

curl http://localhost:3000/groups
{
  "groups": [
    { "id": "[email protected]", "subject": "My Group", "size": 15, "desc": "Group description" }
  ]
}

Send Text Message

curl -X POST http://localhost:3000/send \
  -H 'Content-Type: application/json' \
  -d '{"phone": "919876543210", "message": "Hello!"}'
{ "success": true, "to": "919876543210" }

Send Image

curl -X POST http://localhost:3000/send \
  -H 'Content-Type: application/json' \
  -d '{"phone": "919876543210", "image": "https://example.com/photo.jpg", "caption": "Check this out"}'

Send Video

curl -X POST http://localhost:3000/send \
  -H 'Content-Type: application/json' \
  -d '{"phone": "919876543210", "video": "https://example.com/video.mp4", "caption": "Watch this"}'

Send Voice Note

curl -X POST http://localhost:3000/send \
  -H 'Content-Type: application/json' \
  -d '{"phone": "919876543210", "audio": "https://example.com/voice.ogg"}'

Send Document

curl -X POST http://localhost:3000/send \
  -H 'Content-Type: application/json' \
  -d '{"phone": "919876543210", "document": "https://example.com/report.pdf", "mimetype": "application/pdf", "fileName": "report.pdf"}'

Send to Self

curl -X POST http://localhost:3000/send/self \
  -H 'Content-Type: application/json' \
  -d '{"message": "Test alert"}'

Send to Group

curl -X POST http://localhost:3000/send/group \
  -H 'Content-Type: application/json' \
  -d '{"groupId": "[email protected]", "message": "Hello group!"}'

Send to Channel

curl -X POST http://localhost:3000/send/channel \
  -H 'Content-Type: application/json' \
  -d '{"channelId": "120363098765@newsletter", "message": "Channel update"}'

Message Content Fields

All send endpoints (/send, /send/self, /send/group, /send/channel) accept these content fields:

| Field | Type | Extra Fields | Description | |-------|------|-------------|-------------| | message | string | — | Text message | | image | URL | caption? | Image with optional caption | | video | URL | caption? | Video with optional caption | | audio | URL | ptt? (default: true) | Voice note or audio file | | document | URL | mimetype (required), fileName?, caption? | Document attachment |

CLI Commands

| Command | Description | |---------|-------------| | wabridge | Link WhatsApp via QR code + interactive CLI | | wabridge --code | Link WhatsApp via pairing code | | wabridge start | Start API server on port 3000 | | wabridge start 8080 | Start API server on custom port |

Interactive CLI Commands

| Command | Description | |---------|-------------| | /send | Send a message to any number | | /self | Send a message to yourself | | /groups | List all groups with JIDs | | /sendgroup | Send a message to a group | | /sendchannel | Send a message to a channel | | /status | Check connection status | | /disconnect | Unlink WhatsApp and remove saved auth | | /quit | Exit |

Use Cases

  • Trading alerts to WhatsApp
  • Server monitoring notifications
  • Automated reminders
  • Send media (images, videos, documents) programmatically
  • Group and channel messaging
  • Any app that needs to send WhatsApp messages via HTTP

Configuration

| Option | Default | Description | |--------|---------|-------------| | Port | 3000 | wabridge start 8080 or PORT=8080 wabridge start | | Auth | ~/.wabridge/auth_store | WhatsApp session credentials |

Requirements

  • Node.js >= 20.0.0

Credits

Built on Baileys.

License

MIT