What It Does
The Add WhatsApp skill:- Installs WhatsApp channel code and dependencies
- Authenticates via QR code (browser or terminal) or pairing code
- Registers your main chat and optional additional groups
- Verifies the connection and provides testing instructions
Prerequisites
- NanoClaw base installation complete
- Phone with WhatsApp installed
- For pairing code: your phone number with country code
How to Apply
Choose authentication method
Select one:
- QR code in browser (Recommended) - Large scannable QR code
- Pairing code - Enter numeric code on your phone (no camera needed)
- QR code in terminal - Terminal-based QR (can be small)
Authenticate
- QR code: Scan with WhatsApp > Settings > Linked Devices
- Pairing code: Enter the code in WhatsApp (expires in 60 seconds)
Configure chat type
Choose:
- Shared number: Your personal WhatsApp (use self-chat or solo group)
- Dedicated number: Separate phone/SIM for the assistant
Register main chat
Select where to chat:
- Self-chat (Recommended for shared) - “Message Yourself” conversation
- DM with bot (Recommended for dedicated) - Direct message the bot
- Solo group - Group with just you
- Existing group - Any WhatsApp group
What Changes
Files Created
src/channels/whatsapp.ts- WhatsApp channel implementationstore/auth/creds.json- WhatsApp authentication credentialsstore/auth/- Additional WhatsApp session filesgroups/whatsapp_main/- Main chat workspace
Files Modified
package.json- Adds@whiskeysockets/baileys,qrcode,qrcode-terminalsrc/channels/index.ts- Imports WhatsApp channel.nanoclaw/state.yaml- Records skill applicationstore/messages.db- Adds registered group entries
Dependencies Added
@whiskeysockets/baileys- WhatsApp Web APIqrcode- QR code generationqrcode-terminal- Terminal QR code display
Usage
Main Chat (No Trigger Required)
In your main chat, any message triggers the assistant:Additional Groups (Trigger Required)
In other groups, use the trigger word (default@Andy):
Adding More Groups
To register additional WhatsApp groups:- Add the bot to the group
- Run
/add-whatsappagain - Select the group from the list
- Choose trigger-required mode
For shared numbers (personal WhatsApp), use self-chat or a solo group to avoid the assistant responding to all your personal messages.
Troubleshooting
QR Code Expired
QR codes expire after ~60 seconds. Re-run authentication:Pairing Code Not Working
Codes expire in ~60 seconds. Ensure:- Phone number includes country code without
+(e.g.,1234567890) - Phone has internet access
- WhatsApp is updated to latest version
- You enter the code immediately when displayed
”conflict” Disconnection
Two instances are using the same credentials. Stop other instances:Bot Not Responding
Check:store/auth/creds.jsonexists- Chat is registered in database
- Service is running
- Logs:
tail -50 logs/nanoclaw.log