Repository navigation
Releases: JPres-Projects/Basic-Whatsapp-Private-API
Releases · JPres-Projects/Basic-Whatsapp-Private-API
Release list
v1.0.2 API Call Fix (see APIComands.md)
WhatsApp API Server - Windows Commands
Server Setup
- Port: 8080
- Compile:
go build main.go - Run:
./main
Available Endpoints
1. Server Status
curl.exe -X GET http://localhost:8080/api/status2. List Chats
curl.exe -X GET http://localhost:8080/api/chats3. Search Contacts
curl.exe -X GET "http://localhost:8080/api/contacts?search=491"4. Get Messages
curl.exe -X GET "http://localhost:8080/api/messages?chat_jid=4915510974808@s.whatsapp.net&limit=20"5. Send Text Message
curl.exe -X POST http://localhost:8080/api/send -H "Content-Type: application/json" -d "{\"recipient\":\"4915510974808\",\"message\":\"Hello!\"}"6. Send Image/Video/Document
curl.exe -X POST http://localhost:8080/api/sendFile -F "recipient=4915510974808" -F "caption=Test Image" -F "file=@C:/Users/stand/Pictures/image.png"
curl.exe -X POST http://localhost:8080/api/sendFile -F "recipient=4915510974808" -F "caption=Test Video" -F "file=@C:/Users/stand/Videos/video.mp4"
curl.exe -X POST http://localhost:8080/api/sendFile -F "recipient=4915510974808" -F "caption=Document" -F "file=@C:/Users/stand/Documents/file.pdf"7. Send Audio/Voice Message
curl.exe -X POST http://localhost:8080/api/sendAudio -F "recipient=4915510974808" -F "audio=@C:/Users/stand/Music/audio.ogg"8. Download Media
curl.exe -X POST http://localhost:8080/api/download -H "Content-Type: application/json" -d "{\"message_id\":\"MESSAGE_ID_HERE\",\"chat_jid\":\"4915510974808@s.whatsapp.net\"}"File Formats & Limits
Images → ImageMessage
.jpg, .jpeg, .png, .gif, .webp- Max: 5 MB
Videos → VideoMessage
.mp4, .avi, .mov- Max: 16 MB
Audio → AudioMessage (Voice)
.ogg(Opus codec) - BEST for voice messages.m4a, .aac, .amr- Max: 16 MB
Documents → DocumentMessage
- All other files (
.pdf, .txt, .doc, etc.) - Max: 100 MB
Response Format
{
"success": true,
"message": "Operation completed",
"data": {...}
}Quick Test Sequence
curl.exe -X GET http://localhost:8080/api/status
curl.exe -X GET http://localhost:8080/api/chats
curl.exe -X POST http://localhost:8080/api/send -H "Content-Type: application/json" -d "{\"recipient\":\"4915510974808\",\"message\":\"API Test\"}"Note: Replace localhost:8080 with your domain if using Cloudflare tunnel.
v1.0.1
v1.0.0 - Whatsapp Private API (local)
🚀 Features:
- REST API on port 8080
- Endpoints: /api/send, /api/download
- QR Code authentication on first run
- Session persistence in store/ directory
📝 Installation:
git clone https://github.com/JPres-Projects/Whatsapp-Private-Number-API.git
cd Whatsapp-Private-Number-API/whatsapp-bridge
go mod tidy
go build -o whatsapp-api main.go
./whatsapp-api