A WhatsApp Web API built with Go using whatsmeow. Send messages, images, and manage WhatsApp interactions programmatically.
Important: Phone numbers must include the country code (e.g., 91XXXXXXXXXX for India).
Option 1: Download the latest binary from releases
Option 2: Build from source (requires Go 1.25+)
git clone https://github.com/Piyushhbhutoria/whatsappWebAPI.git cd whatsappWebAPI make runConfiguration flags:
-debug: Enable debug logs-db-dialect:sqlite3orpostgres(default:sqlite3)-db-address: Database connection string
- Run the application and scan the QR code with WhatsApp Web
- Use commands interactively:
Messaging:
send <jid> <text>- Send text messagesendimg <jid> <image path> [caption]- Send imagesendbulk <csv file>- Bulk text (CSV:<jid>,<message>)sendbulkimg <csv file>- Bulk images (CSV:<jid>,<image path>,[caption])
User Management:
checkuser <phone numbers...>- Check if users are on WhatsAppgetuser <jids...>- Get user infogetavatar <jid> [preview]- Get user avatar
Groups:
listgroups- List all groupsgetgroup <group_jid>- Get group infogetinvitelink <group_jid> [--reset]- Get/reset invite linkqueryinvitelink <link>- Query invite link infojoininvitelink <link>- Join group via invite link
Presence & Privacy:
subscribepresence <jid>- Subscribe to presence updatespresence <presence_type>- Send presencechatpresence <presence_type> <jid> [media_type]- Send chat presenceprivacysettings- Get privacy settings
Utility:
reconnect- Reconnect to WhatsApplogout- Logout from WhatsAppappstate <types...> [resync]- Sync app stateCtrl+C- Exit
Bulk Text:
919876543210,Hello from bulk message 919876543211,Another message Bulk Image:
919876543210,/path/to/image1.jpg,Caption 1 919876543211,/path/to/image2.jpg,Caption 2 Demo files available in files folder.
