Getting Started
WA-RS is a multi-session WhatsApp REST API gateway built with Rust. It provides a simple HTTP interface to interact with WhatsApp Web.
Features
- Multi-session support - Manage multiple WhatsApp accounts
- QR Code & Pair Code authentication - Connect via QR scan or phone number
- Send messages - Text, image, video, audio, document, sticker, location, contact
- Webhook support - Receive events with HMAC-SHA256 signatures
- JWT authentication - Secure API access
- PostgreSQL database - Persistent session storage
- Swagger UI - Interactive API documentation
Quick Start
Using Docker Compose (Recommended)
git clone https://github.com/fdciabdul/wa-rs.git
cd wa-rs/rest-api
docker compose up -d
Manual Installation
-
Requirements
- Rust 1.75+
- PostgreSQL 14+
-
Clone and build
git clone https://github.com/fdciabdul/wa-rs.git
cd wa-rs/rest-api
cargo build --release -
Configure environment
cp .env.example .env
# Edit .env with your PostgreSQL credentials -
Run
cargo run --release
Access Points
After starting the server:
| Endpoint | Description |
|---|---|
| http://localhost:3000 | API Base URL |
| http://localhost:3000/swagger-ui | Swagger UI Documentation |
| http://localhost:3000/health | Health Check |
Next Steps
- Installation Guide - Detailed setup instructions
- Authentication - How to authenticate API requests
- API Reference - Complete API documentation