WAHooks
CLI

Connections

Manage WhatsApp connections from the CLI

List connections

wahooks connections list
ID                                    STATUS      SESSION                         PHONE
────────────────────────────────────  ──────────  ──────────────────────────────  ──────────────
24ed01e6-bd9b-4f24-94b7-f4834c0b28c2  working     u_a80ffc986f8b_s_35a28b3871e5

1 connection(s)
wahooks connections quick

Gets a connection ready to scan — reuses an existing idle connection if available, or creates a new one. The QR code is saved as a PNG and opened automatically. One command instead of create + qr.

Alias: wahooks c q

Create a connection

wahooks connections create
Created connection d7e5f208-... (status: pending)

Get QR code

wahooks connections qr CONNECTION_ID --poll

The --poll flag retries until the QR is available (worker may need a few seconds to boot). The QR code is saved as a PNG file and opened automatically.

Get connection details

wahooks connections get CONNECTION_ID

Get WhatsApp profile

wahooks connections me CONNECTION_ID

List recent chats

wahooks connections chats CONNECTION_ID

Send a message

wahooks connections send CONNECTION_ID CHAT_ID "Your message here"

Example:

wahooks connections send d7e5f208-... 1234567890@s.whatsapp.net "Hello from CLI!"

Send media

Pass a URL or a local file path — the CLI auto-detects which and handles base64 encoding for local files.

# Image by URL
wahooks connections send-image CONNECTION_ID CHAT_ID https://example.com/photo.jpg --caption "Check this out"

# Image from local file
wahooks connections send-image CONNECTION_ID CHAT_ID ./photo.png

# Document (auto-detects filename from path)
wahooks connections send-document CONNECTION_ID CHAT_ID ./report.pdf

# Video
wahooks connections send-video CONNECTION_ID CHAT_ID ./clip.mp4

# Audio/voice
wahooks connections send-audio CONNECTION_ID CHAT_ID ./voice.ogg

Send location

wahooks connections send-location CONNECTION_ID CHAT_ID 37.7749 -122.4194 --name "San Francisco"

Send contact card

wahooks connections send-contact CONNECTION_ID CHAT_ID "John Doe" 1234567890

Restart a connection

wahooks connections restart CONNECTION_ID

This fully resets the WAHA session (you'll need to scan QR again).

Delete a connection

wahooks connections delete CONNECTION_ID

Aliases

All connection commands support the alias conn or c:

wahooks c list
wahooks c create
wahooks c qr CONNECTION_ID --poll

On this page