Get started with Evolution API
Evolution API is a powerful WhatsApp integration platform that supports multiple messaging services. This guide will help you set up your first instance and send your first message in minutes.Evolution API supports both WhatsApp Web (Baileys) and WhatsApp Business API. This quickstart uses the free Baileys integration.
Prerequisites
Before you begin, ensure you have:- Docker and Docker Compose installed
- A phone with WhatsApp installed for QR code scanning
- An API key for authentication
Installation
Configure environment variables
Copy the example environment file and configure your settings:Edit the
.env file with your configuration. At minimum, set these critical variables:.env
Create your first instance
Now let’s create a WhatsApp instance and connect it.Scan the QR code
Open WhatsApp on your phone and scan the QR code:
- Open WhatsApp on your phone
- Go to Settings > Linked Devices
- Tap Link a Device
- Scan the QR code from the response (use the
base64image)
Next steps
Congratulations! You’ve successfully set up Evolution API and sent your first message. Here’s what to explore next:Send media messages
Learn how to send images, videos, documents, and audio files
Configure webhooks
Receive real-time events for incoming messages and status updates
Connect chatbots
Integrate with OpenAI, Dify, Typebot, and more
API reference
Explore the complete API documentation
Common issues
QR code not appearing
QR code not appearing
If the QR code is not returned:
- Check the instance status:
GET /instance/connectionState/{instanceName} - Verify the instance is in
connectingstate - Try connecting manually:
GET /instance/connect/{instanceName} - Check Docker logs:
docker-compose logs -f api
Connection keeps disconnecting
Connection keeps disconnecting
If your instance keeps disconnecting:
- Ensure your phone has a stable internet connection
- Keep WhatsApp open on your phone during initial connection
- Check if you’ve reached the maximum number of linked devices (4)
- Verify Redis is running:
docker-compose ps redis
API returns 401 Unauthorized
API returns 401 Unauthorized
Database connection errors
Database connection errors
If you encounter database errors:
- Verify PostgreSQL is running:
docker-compose ps evolution-postgres - Check the database connection URI in
.env - Ensure the database schema is deployed:
docker-compose exec api npm run db:deploy - View database logs:
docker-compose logs evolution-postgres
Need help?
Join our community for support:- WhatsApp Community - Get help from the community
- Discord Server - Real-time chat with developers
- GitHub Issues - Report bugs and request features
- Documentation - Complete guides and tutorials