whatsapp

Featured

Send and receive WhatsApp messages via the unofficial linked-device client pywhats (pip install pywhats) — pair with QR, send text/images, group chat, read receipts, presence/typing, and a long-running JSON event stream. Use when the user wants to script WhatsApp as a linked companion device (like WhatsApp Web), pair a device, send a WhatsApp from Python, or listen for inbound messages. Triggers: 'whatsapp', 'send whatsapp', 'pair whatsapp', 'pywhats', 'linked device', 'whatsapp web client'. NOT the official WhatsApp Business/Cloud API.

AI & Automation 422 stars 45 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 90/100

Stars 20%
87
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# WhatsApp (pywhats) Drive a WhatsApp account as a **linked companion device** (like WhatsApp Web) from async Python via [`pywhats`](https://pypi.org/project/pywhats/) (pre-alpha, text/image only). This is an **unofficial** multi-device client — **not** the official WhatsApp Business / Cloud API. CLI entrypoint: `scripts/wa.py` (auto-bootstraps a managed venv on first run). ## Mental model - **Pairing = one-time QR scan.** `wa.py pair` shows an ASCII QR; scan it in WhatsApp → Linked Devices. Credentials persist to `$PYWHATS_HOME/<session>.session` (+ `.signal.db`). - **Resuming = silent.** Later commands reconnect with the same session — no QR. - **JIDs address chats.** Bare phone `15550001234` → `15550001234@s.whatsapp.net`; groups use `...@g.us`. - **Events are how you receive.** `wa.py listen` prints one JSON object per event. ## ⚠️ Never bare-await Client calls inside a handler Event handlers run **inline on the receive loop**. Awaiting `send_*`, `mark_read`, `get_group_info`, `download_media`, etc. inside a handler **deadlocks** the connection. Always `asyncio.create_task(...)`. The `listen` subcommand already does this for `--read`. ## Commands ```bash scripts/wa.py pair # one-time QR pair scripts/wa.py send-text 15550001234 "hello" # 1:1 text scripts/wa.py send-image 15550001234 photo.jpg --caption hi # 1:1 image scripts/wa.py group-info 120363000000000000@g.us # group metadata JSON scrip...

Details

Author
sanjay3290
Repository
sanjay3290/ai-skills
Created
8 months ago
Last Updated
today
Language
Python
License
Apache-2.0

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category