### Environment Configuration Example Source: https://github.com/evolution-foundation/evolution-go/blob/main/README.md Example `.env` file showing essential configuration variables for server, security, database, and logging. ```env # Server SERVER_PORT=8080 CLIENT_NAME=evolution # Security GLOBAL_API_KEY=your-secure-api-key-here # Database POSTGRES_AUTH_DB=postgresql://postgres:password@localhost:5432/evogo_auth?sslmode=disable POSTGRES_USERS_DB=postgresql://postgres:password@localhost:5432/evogo_users?sslmode=disable DATABASE_SAVE_MESSAGES=false # Logging WADEBUG=DEBUG LOGTYPE=console # Optional # AMQP_URL=amqp://guest:guest@localhost:5672/ # NATS_URL=nats://localhost:4222 # WEBHOOK_URL=https://your-webhook-url.com/webhook # MINIO_ENABLED=true # MINIO_ENDPOINT=localhost:9000 # MINIO_ACCESS_KEY=minioadmin # MINIO_SECRET_KEY=minioadmin ``` -------------------------------- ### Local Development Setup Source: https://github.com/evolution-foundation/evolution-go/blob/main/README.md Steps to clone the repository, set up dependencies, configure environment variables, and run the service for local development. ```bash git clone https://github.com/evolution-foundation/evolution-go.git cd evolution-go # Clone whatsmeow dependency git clone git@github.com:evolution-foundation/whatsmeow.git whatsmeow-lib # Setup, configure and run make setup cp .env.example .env make dev ``` -------------------------------- ### Get Instance Status Source: https://github.com/evolution-foundation/evolution-go/blob/main/README.md Retrieves the current status of a specific WhatsApp instance. ```APIDOC ## GET /instance/{name}/status ### Description Get instance status ### Method GET ### Endpoint /instance/{name}/status ### Parameters #### Path Parameters - **name** (string) - Required - The name of the instance ``` -------------------------------- ### Get QR Code Source: https://github.com/evolution-foundation/evolution-go/blob/main/README.md Retrieves the QR code for a specific instance, used for pairing the WhatsApp account. ```APIDOC ## GET /instance/{name}/qrcode ### Description Get QR code for pairing ### Method GET ### Endpoint /instance/{name}/qrcode ### Parameters #### Path Parameters - **name** (string) - Required - The name of the instance ``` -------------------------------- ### Evolution Go API Documentation Source: https://github.com/evolution-foundation/evolution-go/blob/main/README.md Access the full API documentation through the Swagger UI, which provides details on all available RESTful endpoints, their parameters, request/response formats, and examples. ```APIDOC ## API Documentation Swagger UI available at: ``` http://localhost:8080/swagger/index.html ``` ### Description The Evolution Go API offers a comprehensive set of RESTful endpoints for integrating with WhatsApp. The API documentation is available via Swagger UI, providing interactive access to all available operations, including details on HTTP methods, endpoints, parameters, request bodies, and response schemas. This allows developers to explore and test the API directly from their browser. ``` -------------------------------- ### Docker Build and Run Source: https://github.com/evolution-foundation/evolution-go/blob/main/README.md Use these commands to build the Docker image and run the Evolution Go service locally. ```bash git clone https://github.com/evolution-foundation/evolution-go.git cd evolution-go make docker-build make docker-run ``` -------------------------------- ### Create Instance Source: https://github.com/evolution-foundation/evolution-go/blob/main/README.md Creates a new WhatsApp instance. This is the first step to using the service. ```APIDOC ## POST /instance/create ### Description Create WhatsApp instance ### Method POST ### Endpoint /instance/create ``` -------------------------------- ### Project Structure Source: https://github.com/evolution-foundation/evolution-go/blob/main/README.md Overview of the directory layout for the Evolution Go project. ```tree evolution-go/ ├── cmd/evolution-go/ # Application entry point ├── pkg/ │ ├── core/ # License management & middleware │ ├── instance/ # Instance management │ ├── message/ # Message handling │ ├── sendMessage/ # Message sending │ ├── routes/ # HTTP routes │ ├── middleware/ # Auth & validation middleware │ ├── config/ # Configuration │ ├── events/ # Event producers (AMQP, NATS, Webhook, WS) │ └── storage/ # Media storage (MinIO) ├── whatsmeow-lib/ # WhatsApp protocol library ├── docs/ # Swagger documentation ├── Dockerfile ├── Makefile └── VERSION ``` -------------------------------- ### Swagger UI Access Source: https://github.com/evolution-foundation/evolution-go/blob/main/README.md Access the Swagger UI to explore and interact with the Evolution Go API documentation. ```bash http://localhost:8080/swagger/index.html ``` -------------------------------- ### Send Media Message Source: https://github.com/evolution-foundation/evolution-go/blob/main/README.md Sends a media message (e.g., image, video, audio) from a specified instance to a recipient. ```APIDOC ## POST /message/sendMedia ### Description Send media message ### Method POST ### Endpoint /message/sendMedia ``` -------------------------------- ### Delete Instance Source: https://github.com/evolution-foundation/evolution-go/blob/main/README.md Deletes a specific WhatsApp instance and its associated data. ```APIDOC ## DELETE /instance/{name} ### Description Delete instance ### Method DELETE ### Endpoint /instance/{name} ### Parameters #### Path Parameters - **name** (string) - Required - The name of the instance to delete ``` -------------------------------- ### Send Text Message Source: https://github.com/evolution-foundation/evolution-go/blob/main/README.md Sends a text message from a specified instance to a recipient. ```APIDOC ## POST /message/sendText ### Description Send text message ### Method POST ### Endpoint /message/sendText ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.