Skip to main content

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

git clone https://github.com/fdciabdul/wa-rs.git
cd wa-rs/rest-api
docker compose up -d

Manual Installation

  1. Requirements

    • Rust 1.75+
    • PostgreSQL 14+
  2. Clone and build

    git clone https://github.com/fdciabdul/wa-rs.git
    cd wa-rs/rest-api
    cargo build --release
  3. Configure environment

    cp .env.example .env
    # Edit .env with your PostgreSQL credentials
  4. Run

    cargo run --release

Access Points

After starting the server:

EndpointDescription
http://localhost:3000API Base URL
http://localhost:3000/swagger-uiSwagger UI Documentation
http://localhost:3000/healthHealth Check

Next Steps