WUZAPI is an implementation of the whatsmeow library as a simple RESTful API service, with support for multiple devices and concurrent sessions.
WUZAPI offers a complete API to interact with WhatsApp efficiently without using heavy resources like Puppeteer or Android emulators.
Direct communication with WhatsApp servers via websocket, resulting in lower memory and CPU usage.
Support for multiple devices and users simultaneously on the same instance.
Send text, images, audio, documents, videos, stickers, location, and contacts.
Configure webhooks to receive real-time notifications of events and messages.
Check if phone numbers have WhatsApp and get profile information.
Token system for easy and secure user authentication.
WUZAPI offers several endpoints to interact with WhatsApp, organized into functional categories.
See how easy it is to use the WUZAPI API to interact with WhatsApp.
Using this software in violation of WhatsApp's Terms of Service may result in your number being banned. Be very careful, do not use it for SPAM or anything similar. Use at your own risk. If you need to develop something with commercial interest, contact a global WhatsApp solution provider and sign up for the WhatsApp Business API service.
Instructions to start using WUZAPI quickly.
To run WUZAPI, you need:
Compile the project with the following command:
go build .
WuzAPI uses a .env file for configuration. Here are the required settings:
WUZAPI_ADMIN_TOKEN=your_admin_token_here USER=wuzapi PASSWORD=wuzapi NAME=wuzapi HOST=localhost PORT=5432 America/New_York
WUZAPI_ADMIN_TOKEN=your_admin_token_here TZ=America/New_York
By default, the service will start on port 8080. You can change the behavior with the following parameters:
-address
: defines the IP address to bind the server (default 0.0.0.0)-port
: defines the port number (default 8080)-logtype
: format for logs, console (default) or json-wadebug
: enables whatsmeow debug, INFO or DEBUG levels are supported-sslcertificate
: SSL Certificate File-sslprivatekey
: SSL Private Key File-skipmedia
: Do not automatically download media from received messages-osname
: Connection OSName in Whatsapp (default "Mac OS 10")-admintoken
: Security Token to authorize admin actions (list/create/remove users)./wuzapi -logtype json
To open sessions, you first need to create a user and define an authentication token for it. You can do this login into the Dashboard, or using the API directly:
curl -X POST http://localhost:8080/admin/users \ -H "Authorization: $WUZAPI_ADMIN_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name": "John", "token": "Z1234ABCCXD"}'
Once users are created, you can communicate with the API by passing the Token header as a simple authentication method. You can have multiple users (different numbers) on the same server. For every user you will need to Connect to whatsapp and then either scan a QR Code or Pair via phone number.
The daemon also serves some static web files, useful for development/testing that you can load with your browser:
If you like WUZAPI and want to help keep the project active and in development, consider making a donation. Your support is very important!