>_ DevTrendsen

Language

Home

Languages

Sections

Frontend Backend Mobile DevOps AI / ML GameDev Blockchain Embedded Security
Go

WhatsApp Integration Without RAM Hunger: A Look at Evolution Go

If you've ever linked WhatsApp to a CRM or built a notification service, you're probably familiar with the resource problem. Most ready-made Open Source solutions are stuffed with JavaScript libraries like Baileys or run a headless Puppeteer browser. A couple hundred active instances in this scenario can easily consume tens of gigabytes of RAM.

Evolution Foundation developers ran into this directly. Their main project, Evolution API, is written in Node.js and works great for most tasks. But when scaling was needed, they decided to rewrite the core engine in Go.

That gave birth to evolution-go — a service that wraps the whatsmeow library in a clean REST API.

Evolution Foundation

What's Inside the Project

At the core of the service is whatsmeow — one of the fastest Go libraries for working with the WhatsApp protocol. On top sits the Gin web framework, which handles HTTP requests, and Swagger for documentation.

The main idea behind the service is to handle all the low-level socket work, sessions, QR code authorization, and media delivery on its own. You just send a regular HTTP POST request with JSON, and the service takes care of the rest.

Architectural Highlights

It's interesting how the authors approached incoming event delivery. Often, such services are limited to regular webhooks only. Here, the choice is wider:

  • Webhooks for simple integrations
  • WebSockets for real-time interfaces
  • RabbitMQ (AMQP) and NATS for reliable queues in distributed systems

If your client sends or receives images, voice messages, or documents, evolution-go can dump them directly to S3 or MinIO. All text history and connection statuses are saved to PostgreSQL via GORM when needed.

How It Works in Practice

The easiest way to run the project is via Docker.

git clone https://github.com/evolution-foundation/evolution-go.git
cd evolution-go
make docker-build
make docker-run

After starting the application, you need to fill in the configuration file .env. The minimal set of settings looks like this:

SERVER_PORT=8080 CLIENT_NAME=my_app GLOBAL_API_KEY=super-secret-key POSTGRES_AUTH_DB=postgresql://postgres:pass@localhost:5432/evogo_auth?sslmode=disable POSTGRES_USERS_DB=postgresql://postgres:pass@localhost:5432/evogo_users?sslmode=disable DATABASE_SAVE_MESSAGES=false

There's an important detail here that's easy to stumble on during first launch. The project uses an activation system. Right after startup, all API endpoints will return a 403 error.

To get the service working, you need to open the built-in control panel at address http://localhost:8080/manager/login, enter your GLOBAL_API_KEY, and go through a short instance registration process. After that, the status will be saved to the database and the API will become available.

Sending Your First Message

After activation, you can go to Swagger UI at address http://localhost:8080/swagger/index.html or make a request from the terminal.

First, we create an instance and get a QR code for linking WhatsApp:

curl -X POST http://localhost:8080/instance/create \
  -H "apikey: super-secret-key" \
  -H "Content-Type: application/json" \
  -d '{"instanceName": "office_number"}'

Grab the QR code via GET /instance/office_number/qrcode, scan it through the WhatsApp app on your phone, and send a test text:

curl -X POST http://localhost:8080/message/sendText \
  -H "apikey: super-secret-key" \
  -H "Content-Type: application/json" \
  -d '{
    "instanceName": "office_number",
    "number": "79991112233",
    "text": "Привет! Это сообщение отправлено через Evolution Go."
  }'

Where This Comes in Handy

First and foremost, the project will interest those building their own CRM systems, support services, or notification systems.

If you need to keep dozens of WhatsApp numbers connected simultaneously, the Go option will save you a significant amount on servers compared to Node.js alternatives. Having NATS and RabbitMQ out of the box makes integration into an existing microservices architecture much easier.

On the downside, there's the mandatory activation step via the manager on first startup. If you're planning a fully automated deployment to Kubernetes, you'll need to script this as a separate step.

Evolution Go is a good alternative to heavyweight integration services. The project is still young, but it has an active community behind it that is simultaneously developing the entire Evolution Foundation ecosystem.

Worth trying if you're looking for a fast WhatsApp gateway with a proper REST API and don't want to spend gigabytes of memory on each active session.

Related projects