Skip to main content

Introduction

WA-RS is a high-performance WhatsApp REST API Gateway built with Rust. It provides a simple and secure way to integrate WhatsApp messaging capabilities into your applications.

Features

Core Features

  • Multi-Session Support - Manage multiple WhatsApp sessions simultaneously
  • QR Code & Pair Code Authentication - Connect via QR code scanning or 8-digit pair code
  • Webhook Events - Receive real-time notifications with HMAC-SHA256 signature verification
  • RESTful API - Simple JSON-based API with OpenAPI/Swagger documentation
  • JWT Authentication - Secure API access with token-based authentication
  • Docker Ready - Easy deployment with Docker and Docker Compose

Messaging Capabilities

  • Text Messages - Send plain text messages
  • Media Messages - Send images, videos, audio, documents, and stickers
  • Location Sharing - Share geographical locations
  • Contact Sharing - Share contact cards (vCards)
  • Message Reactions - Add emoji reactions to messages
  • Message Editing - Edit sent messages
  • Voice Notes - Send push-to-talk audio messages

Dashboard

  • Terminal Theme - Beautiful hacker-style terminal UI
  • Session Management - Create, connect, disconnect, and delete sessions
  • QR Code Display - Visual QR code for easy scanning
  • Pair Code Support - Connect using phone number and 8-digit code
  • Real-time Status - Monitor session connection status
  • Protected Access - JWT-based authentication for dashboard

Developer Experience

  • Swagger UI - Interactive API documentation at /swagger-ui
  • Health Checks - Built-in health endpoint for monitoring
  • Structured Logging - JSON-formatted logs with tracing
  • Environment Configuration - Configure via .env or environment variables

Architecture

┌─────────────────────────────────────────────────────────────┐
│ WA-RS Gateway │
├─────────────────────────────────────────────────────────────┤
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │
│ │ Dashboard │ │ REST API │ │ Webhook Dispatcher │ │
│ │ (Askama) │ │ (Axum) │ │ │ │
│ └─────────────┘ └─────────────┘ └─────────────────────┘ │
├─────────────────────────────────────────────────────────────┤
│ ┌─────────────────────────────────────────────────────────┐│
│ │ Session Manager (Multi-Device) ││
│ └─────────────────────────────────────────────────────────┘│
├─────────────────────────────────────────────────────────────┤
│ ┌─────────────────┐ ┌─────────────────────┐ │
│ │ PostgreSQL │ │ SQLite (Sessions) │ │
│ │ (Metadata) │ │ (WhatsApp State) │ │
│ └─────────────────┘ └─────────────────────┘ │
└─────────────────────────────────────────────────────────────┘

Tech Stack

ComponentTechnology
LanguageRust
Web FrameworkAxum 0.8
Template EngineAskama
DatabasePostgreSQL + SQLite
AuthenticationJWT (jsonwebtoken)
WhatsApp Protocolwacore (custom)
DocumentationSwagger/OpenAPI

Support the Project

If WA-RS helps your project, consider supporting the development: