Skip to content

gerenciador323/quepasa

Β 
Β 

Repository files navigation

Go Build

Quepasa-logo

QuePasa is an open-source, free license software to exchange messages with WhatsApp Platform


Telegram-logo Chat with us on Telegram: Group || Channel

Special thanks to Lukas Prais, who developed this logo.


QuePasa

A micro web-application to make web-based WhatsApp bots easy to write.

Current Version: 3.25.1115.2145

Run in Postman

πŸš€ Quick Start

Docker Installation (Recommended)

The fastest way to get QuePasa running:

# Clone the repository
git clone https://github.com/nocodeleaks/quepasa.git
cd quepasa/docker

# Configure environment
cp .env.example .env
# Edit .env with your settings

# Start with Docker Compose
docker-compose up -d --build

πŸ“– Complete Docker Setup Guide

Alternative Installation Methods

πŸ“‹ Table of Contents

✨ Features

QuePasa provides a simple HTTP API to integrate WhatsApp messaging into your applications:

  • πŸ“± QR Code Authentication - Easy WhatsApp Web connection setup
  • πŸ’Ύ Persistent Sessions - Account data and keys stored securely
  • πŸ”— HTTP API Endpoints for:
    • Sending messages (text, media, documents)
    • Receiving messages via webhooks
    • Downloading attachments
    • Managing contacts and groups
    • Group administration
  • πŸ”„ Webhook Support - Real-time message notifications
  • πŸ“Š Message History Sync - Configurable history retrieval
  • 🎯 Advanced Features:
    • Read receipts
    • Message reactions
    • Broadcast messages
    • Call handling
    • Presence management

🐳 Installation

Docker Installation (Recommended)

The easiest way to deploy QuePasa is using Docker with our pre-configured setup:

  1. Quick Setup

    git clone https://github.com/nocodeleaks/quepasa.git
    cd quepasa/docker
    cp .env.example .env
    # Edit .env with your configurations
    docker-compose up -d --build
  2. Access QuePasa

    • Web Interface: http://localhost:31000

πŸ“– Detailed Docker Setup Guide - Complete installation instructions, configuration options, and troubleshooting.

Local Development

For development or custom installations:

Prerequisites

  • Go 1.20+ - Download here
  • PostgreSQL - Database for persistent storage
  • Git - For cloning the repository

Build from Source

# Clone repository
git clone https://github.com/nocodeleaks/quepasa.git
cd quepasa/src

# Install dependencies
go mod download

# Build application
go build -o quepasa main.go

# Run
./quepasa

API Documentation (Swagger)

QuePasa uses Swagger/OpenAPI for API documentation:

# Install swag CLI tool (one-time setup)
go install github.com/swaggo/swag/cmd/swag@latest

# Generate/update API documentation
cd src
swag init --output ./swagger

# Or use the provided script
# Windows: double-click generate-swagger.bat
# Or run: .\generate-swagger.bat

# Or use VS Code task: Ctrl+Shift+P β†’ "Tasks: Run Task" β†’ "Generate Swagger Docs"

The documentation will be available at http://localhost:PORT/swagger (with or without trailing slash) when the application is running.

πŸ”— Integration Examples

N8N Automation Workflows

Pre-built N8N workflows for common automation scenarios:

Chatwoot Help Desk

Complete setup for customer service integration:

API Integration Examples

# Connect and get QR code
# token could be empty, if empty a new token will be generated
# user is the user that will be manage this connection

curl --location 'localhost:31000/scan' \
  --header 'Accept: application/json' \
  --header 'X-QUEPASA-USER: :user' \
  --header 'X-QUEPASA-TOKEN: :token' \
  --data ''


# Send a message
curl --location 'localhost:31000/send' \
  --header 'Accept: application/json' \
  --header 'X-QUEPASA-TRACKID: :trackid' \
  --header 'X-QUEPASA-CHATID: :chatid' \
  --header 'Content-Type: application/json' \
  --header 'X-QUEPASA-TOKEN: :token' \
  --data '{
      
      "text": "Hello World ! \nHello World !"
  }'

# Set webhook
curl --location 'localhost:31000/webhook' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'X-QUEPASA-TOKEN: :token' \
  --data '{
      "url": "https://webhook.example.com/webhook/5465465241654",
      "forwardinternal": true,
      "trackid": "custom-track",
      "extra": {
        "clientId": "12345",
        "company": "myCompany",
        "enviroment": "production",
        "version": "1.0"
      }
  }'

πŸ“š API Documentation

Core Endpoints

  • Messages: /send
  • Media: /send
  • Groups: /groups/
  • Webhooks: /webhook
  • RabbitMQ: /rabbitmq

API Versions

  • v4 (Latest) - Recommended for new integrations
  • v3 - Legacy support
  • v2 - Legacy support
  • v1 - Deprecated

πŸ“– Complete API Documentation - Detailed endpoint documentation with examples.

βš™οΈ Configuration

Environment Variables Overview

Key configuration options (see docker/.env.example for complete list):

# Basic Configuration
DOMAIN=your-domain.com
MASTERKEY=your-secret-key
ACCOUNTSETUP=true  # Enable for first setup

# Database
DBDRIVER=postgres
DBHOST=postgres
DBDATABASE=quepasa_whatsmeow

# Features
GROUPS=true
READRECEIPTS=true
CALLS=true
WEBSOCKETSSL=false

# Performance
CACHELENGTH=800
HISTORYSYNCDAYS=30

πŸ“– Environment Variables Reference - Complete configuration documentation.

πŸ—οΈ Architecture

QuePasa is built with:

  • Backend: Go with Whatsmeow library
  • Database: PostgreSQL for data persistence
  • API: RESTful HTTP endpoints
  • Real-time: WebSocket support for live updates

🀝 Community & Support

Get Help

Alternative Projects

Looking for Node.js? Check out whatsapp-web.js - A more complete Node.js WhatsApp API.

⚠️ Important Notices

  • Security: This application has not been security audited. Use at your own risk.
  • Unofficial: This is a third-party project, not affiliated with WhatsApp.
  • Terms: Ensure compliance with WhatsApp's Terms of Service.
  • Rate Limits: Respect WhatsApp's rate limiting to avoid account suspension.

πŸ”„ Development & Contributing

Project Structure

β”œβ”€β”€ src/                    # Go source code
β”œβ”€β”€ docker/                 # Docker configuration
β”œβ”€β”€ extra/                  # Integration examples
β”‚   β”œβ”€β”€ chatwoot/          # Chatwoot integration
β”‚   β”œβ”€β”€ n8n+chatwoot/      # N8N workflow examples
β”‚   └── typebot/           # TypeBot integration
β”œβ”€β”€ docs/                   # Documentation
└── helpers/               # Installation helpers

Building

# Development build
go build -o .dist/quepasa-dev src/main.go

# Production build
go build -ldflags="-s -w" -o .dist/quepasa-prod src/main.go

Environment Variables Reference

For detailed configuration options, see docker/.env.example and src/environment/README.md.

Core Configuration

Variable Description Default
DOMAIN Your domain name for the service localhost
WEBAPIPORT HTTP server port 31000
WEBSOCKETSSL Use SSL for WebSocket connections false
MASTERKEY Master key for administration required
ACCOUNTSETUP Enable account creation setup true

WhatsApp Features

Variable Description Default
GROUPS Enable group messaging true
BROADCASTS Enable broadcast messages false
READRECEIPTS Trigger webhooks for read receipts false
CALLS Accept incoming calls true
READUPDATE Mark chats as read when sending true

Performance & Caching

Variable Description Default
CACHELENGTH Number of messages in cache 800
CACHEDAYS Days to keep messages in cache 7
HISTORYSYNCDAYS Days of history to sync on QR scan 30
SYNOPSISLENGTH Length for message synopsis 50

Database Configuration

Variable Description Default
DBDRIVER Database driver postgres
DBHOST Database host localhost
DBPORT Database port 5432
DBDATABASE Database name quepasa_whatsmeow
DBUSER Database user quepasa
DBPASSWORD Database password required

Logging & Debug

Variable Description Options
LOGLEVEL Application log level ERROR, WARN, INFO, DEBUG, TRACE
WHATSMEOW_LOGLEVEL WhatsApp library log level error, warn, info, debug
HTTPLOGS Log HTTP requests true, false
DEBUGREQUESTS Debug API requests true, false

Media & Conversion

Variable Description Default
CONVERT_PNG_TO_JPG Convert PNG to JPG format false
COMPATIBLE_MIME_AS_AUDIO Convert audio to OGG/PTT true
REMOVEDIGIT9 Remove digit 9 from BR numbers false

Regional Settings

Variable Description Default
TZ Timezone America/Sao_Paulo
APP_TITLE App title suffix QuePasa
PRESENCE Default presence state unavailable

πŸ“„ License

License GNU AGPL v3.0

QuePasa is free software licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).

What this means:

  • βœ… Free to use for personal and commercial purposes
  • βœ… Modify and distribute freely
  • βœ… No warranty - use at your own risk
  • ⚠️ Copyleft license - derivative works must also be AGPL-3.0
  • ⚠️ Network use - if you run a modified version as a service, you must provide source code

πŸ”— References


Made with ❀️ by the QuePasa Community

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Go 77.9%
  • CSS 15.8%
  • HTML 5.0%
  • Shell 0.6%
  • PowerShell 0.2%
  • JavaScript 0.2%
  • Other 0.3%