No description
  • TypeScript 71.8%
  • CSS 24%
  • JavaScript 4%
  • Dockerfile 0.2%
Find a file
2026-04-14 09:08:27 +08:00
.github fix: update Docker image CI workflow to disable branch tagging for non-default branches 2025-12-03 17:44:43 +08:00
assets Add Feature Delete Session Dashboard dan Session Details 2026-02-03 12:10:20 +07:00
docs Add Feature Delete Session Dashboard dan Session Details 2026-02-03 12:10:20 +07:00
media feat(media): implement media handling for webhook messages and serve static files 2025-04-17 11:23:33 +07:00
readme Refactor code structure for improved readability and maintainability 2026-01-28 15:27:28 +08:00
src Add Feature Delete Session Dashboard dan Session Details 2026-02-03 12:10:20 +07:00
.dockerignore feat(docker): add docker setup configuration 2025-11-16 12:44:43 +08:00
.gitignore feat(media): implement media handling for webhook messages and serve static files 2025-04-17 11:23:33 +07:00
CONTRIBUTING.md update v3.2.0 2023-07-10 23:47:55 +07:00
docker-compose.yaml chore: update version to 4.4.5 in package.json and add restart policy in docker-compose 2025-12-03 10:42:21 +08:00
Dockerfile feat(docker): add docker setup configuration 2025-11-16 12:44:43 +08:00
LICENSE update v3.2.0 2023-07-10 23:47:55 +07:00
package-lock.json chore: update wa-multi-session dependency to stable version 4.1.3 2025-12-04 17:08:27 +08:00
package.json chore: bump axios version to 1.15.0 and update package version to 4.6.3 2026-04-14 09:08:27 +08:00
pnpm-lock.yaml chore: bump axios version to 1.15.0 and update package version to 4.6.3 2026-04-14 09:08:27 +08:00
pnpm-workspace.yaml feat(dashboard): authentication and main dashboard feature 2026-01-09 11:18:43 +08:00
README.md feat(dashboard): update README with example API key and improve session creation instructions 2026-01-28 15:30:24 +08:00
tsconfig.json feat: update version to 4.4.6 in package.json and refactor message, profile, session, and health controllers 2025-12-03 10:59:38 +08:00

Headless Multi Session WhatsApp Gateway

A headless multi-session WhatsApp gateway with multi-device support, easy to set up using Docker.

  • Multi-device support
  • Multi-session / multiple phone numbers
  • Send text messages, images, videos, and documents
  • Webhook integration

📌 Also see: wa-multi-session


⚠️ Prerequisites


Installation & Running

1. Create Application Folder

Create a new folder for your application at ~/app/wa-gateway and navigate into it:

mkdir -p ~/app/wa-gateway
cd ~/app/wa-gateway

2. Create docker-compose.yaml

Use the nano editor to create the file:

nano docker-compose.yaml

Paste the following content into the editor to create docker-compose.yaml

# docker-compose.yaml
services:
  wa-gateway:
    container_name: "wa-gateway"
    restart: unless-stopped
    image: mimamch/wa-gateway:latest
    volumes:
      - ./wa_credentials:/app/wa_credentials
      - ./media:/app/media
    ports:
      - "5001:5001"
    environment:
      - KEY=secret # make your own api key

3. Start the container

Run the following command in the same directory as your docker-compose.yaml:

docker compose up -d

4. Open Browser

Visit this URL to scan the QR code from your WhatsApp device:

http://localhost:5001

Replace localhost with your server's IP or domain if not running locally.

- Login to dashboard with API Key that you set in docker-compose.yaml

alt text

- Create your first session

alt text

5. Send Your First Message via API

Example to send a text message:

GET
http://localhost:5001/message/send-text?session=SESSION_ID&to=628123456789&text=Hello

API Reference

All API endpoints remain the same as the NodeJS version. Here's a quick reference:

Create New Session

GET /session/start?session=NEW_SESSION_NAME

or

POST /session/start
{
  "session": "NEW_SESSION_NAME"
}

Send Text Message

POST /message/send-text

Body fields:

Field Type Required Description
session string Yes The session name you created
to string Yes Target phone number (e.g. 628123456789)
text string Yes The text message
is_group boolean No True if target is a group

Send Image

POST /message/send-image

Body includes all of the above plus image_url.

Send Document

POST /message/send-document

Body includes:

  • document_url
  • document_name

Send Video

POST /message/send-video

Body fields:

Field Type Required Description
session string Yes The session name you created
to string Yes Target phone number (e.g. 628123456789)
text string No Caption for the video (optional)
video_url string Yes URL of the video file
is_group boolean No True if target is a group

Delete Session

GET /session/logout?session=SESSION_NAME

Webhook Setup

To receive real-time events, set your webhook URL using the environment variable:

WEBHOOK_BASE_URL="http://yourdomain.com/webhook"

Example webhook endpoints:

  • Session: POST /webhook/session
  • Message: POST /webhook/message

Access Media Files

Media files are stored inside the ./media directory in the container. You can access them via:

http://localhost:5001/media/FILE_NAME

Upgrading

To update to the latest version:

cd ~/app/wa-gateway
docker compose pull
docker compose down
docker compose up -d

Documentation

For full documentation, examples, and guides, visit: 👉 https://github.com/mimamch/wa-gateway


Let me know if you need configuration examples with environment variables (like webhook setup) or a multi-service deployment!

Need Help?

Get in touch with me in person via email 📧 mimamch28@gmail.com