{"id":49549007,"url":"https://github.com/arktnld/wago-api","last_synced_at":"2026-05-02T21:01:51.366Z","repository":{"id":355280509,"uuid":"1227478201","full_name":"arktnld/wago-api","owner":"arktnld","description":"WhatsApp REST API — native protocol, multi-session, production-ready","archived":false,"fork":false,"pushed_at":"2026-05-02T19:59:52.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-02T20:28:57.020Z","etag":null,"topics":["chatbot","docker","golang","messaging","rest-api","whatsapp","whatsapp-api","whatsmeow"],"latest_commit_sha":null,"homepage":"https://github.com/arktnld/wago-api","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arktnld.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-02T18:33:33.000Z","updated_at":"2026-05-02T19:59:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/arktnld/wago-api","commit_stats":null,"previous_names":["arktnld/wago-api"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/arktnld/wago-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arktnld%2Fwago-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arktnld%2Fwago-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arktnld%2Fwago-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arktnld%2Fwago-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arktnld","download_url":"https://codeload.github.com/arktnld/wago-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arktnld%2Fwago-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32549387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T19:18:06.202Z","status":"ssl_error","status_checked_at":"2026-05-02T19:16:21.335Z","response_time":132,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatbot","docker","golang","messaging","rest-api","whatsapp","whatsapp-api","whatsmeow"],"created_at":"2026-05-02T21:01:17.668Z","updated_at":"2026-05-02T21:01:51.358Z","avatar_url":"https://github.com/arktnld.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wago-api\n\n[![CI](https://img.shields.io/github/actions/workflow/status/arktnld/wago-api/ci.yml?label=CI\u0026logo=github)](https://github.com/arktnld/wago-api/actions)\n[![Release](https://img.shields.io/github/v/release/arktnld/wago-api?logo=github)](https://github.com/arktnld/wago-api/releases)\n[![Go](https://img.shields.io/badge/Go-1.25+-00ADD8?logo=go\u0026logoColor=white)](https://go.dev)\n[![License](https://img.shields.io/github/license/arktnld/wago-api)](LICENSE)\n[![Docker Image Size](https://img.shields.io/docker/image-size/arktnld/wago-api/latest?logo=docker)](https://hub.docker.com/r/arktnld/wago-api)\n[![Go Report Card](https://goreportcard.com/badge/github.com/arktnld/wago-api)](https://goreportcard.com/report/github.com/arktnld/wago-api)\n\n**WhatsApp REST API — native protocol, multi-session, production-ready.**\n\n- **129 REST endpoints** — messaging, groups, communities, channels, privacy, business\n- **Multi-session** — run hundreds of WhatsApp accounts in a single instance\n- **Lightweight Docker image** — single Go binary, zero runtime dependencies\n- **Production-ready** — auto-reconnect, webhook retry, rate limiting, SSRF protection, request tracing\n\n## Quick Start\n\n```bash\ngit clone https://github.com/arktnld/wago-api \u0026\u0026 cd wago-api\ndocker compose up\n```\n\nOpen `http://localhost:3000/session/start/main` to create a session, then scan the QR code at `http://localhost:3000/session/qr/main/image` with WhatsApp \u003e Linked Devices \u003e Link a Device.\n\nSend your first message:\n\n```bash\ncurl -X POST http://localhost:3000/client/sendMessage/main \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"chatId\":\"5511999999999@s.whatsapp.net\",\"text\":\"Hello from wago-api!\"}'\n```\n\n## Features\n\n- **Messaging** — text, image, video, audio, documents, polls, reactions, reply, forward, edit, delete\n- **Groups** — create, manage participants, invite links, permissions, membership approval\n- **Communities** — create, link/unlink sub-groups, manage join approval\n- **Channels** — create, follow, send messages, reactions, fetch history\n- **Contacts** — profile pictures, presence (online/offline/typing), block/unblock, QR links\n- **Privacy** — 10 granular settings (last seen, profile, groups, read receipts, etc), disappearing messages\n- **Business** — verified profiles, wa.me links, bot listing\n- **Calls** — reject incoming calls programmatically\n- **Labels** — create, edit, assign to chats and messages\n- **Multi-session** — run hundreds of accounts in one instance\n- **Webhooks** — real-time events via HTTP POST with automatic retry\n- **WebSocket** — real-time event stream\n\n## API Documentation\n\n**[Open Interactive Documentation (Swagger)](https://editor.swagger.io/?url=https://raw.githubusercontent.com/arktnld/wago-api/main/openapi.json)**\n\nAlso available at `http://localhost:3000/api-docs` when the server is running.\n\n## Docker\n\n```yaml\nservices:\n  api:\n    image: arktnld/wago-api:latest\n    ports:\n      - \"3000:3000\"\n    volumes:\n      - ./sessions:/app/sessions\n    environment:\n      - API_KEY=your-secret-key\n      - BASE_WEBHOOK_URL=https://your-server.com/webhook\n    restart: unless-stopped\n```\n\nOr build locally:\n\n```bash\ndocker compose up --build\n```\n\nSession data is stored in the `./sessions` volume and survives container restarts.\n\n## Configuration\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `PORT` | `3000` | Server port |\n| `API_KEY` | | API key sent via `X-Api-Key` header. Leave empty to disable auth |\n| `BASE_WEBHOOK_URL` | | URL to receive events (e.g. `https://myserver.com/webhook`) |\n| `ENABLE_WEBHOOK` | `true` | Send events via HTTP POST |\n| `ENABLE_WEBSOCKET` | `false` | Send events via WebSocket |\n| `AUTO_START_SESSIONS` | `true` | Reconnect saved sessions on startup |\n| `SET_MESSAGES_AS_SEEN` | `false` | Automatically mark messages as read |\n| `LOG_LEVEL` | `info` | `trace`, `debug`, `info`, `warn`, `error` |\n| `RATE_LIMIT_MAX` | `1000` | Max requests per IP per window |\n| `RATE_LIMIT_WINDOW_MS` | `1000` | Rate limit window in ms |\n| `ENABLE_SWAGGER_ENDPOINT` | `true` | Serve `/api-docs` and `/openapi.json` |\n\n## Webhooks\n\nWhen a WhatsApp event happens (message received, status change, etc), wago-api sends a POST request to your webhook URL:\n\n```\nPOST {BASE_WEBHOOK_URL}/{sessionId}/{event}\n```\n\nExample payload:\n\n```json\n{\n  \"sessionId\": \"main\",\n  \"event\": \"message\",\n  \"data\": {\n    \"id\": \"3EB0F85AB813A2BB26F73D\",\n    \"chat\": \"5511999999999@s.whatsapp.net\",\n    \"sender\": \"5511999999999@s.whatsapp.net\",\n    \"pushName\": \"John\",\n    \"body\": \"Hello!\",\n    \"type\": \"text\",\n    \"timestamp\": 1777744034,\n    \"isGroup\": false,\n    \"isFromMe\": false\n  }\n}\n```\n\nFailed deliveries are retried 3 times with exponential backoff (1s, 2s, 4s).\n\n## Security\n\n- **API Key** — header-only authentication (no query params to avoid log leaks)\n- **SSRF Protection** — blocks requests to private IPs and cloud metadata endpoints\n- **Rate Limiting** — per-IP with automatic cleanup\n- **Request Tracing** — `X-Request-Id` header on every response\n\n## HTTPS\n\nwago-api runs HTTP by default. For production, use a reverse proxy:\n\n**Caddy** (automatic TLS):\n```\nwago.example.com {\n    reverse_proxy localhost:3000\n}\n```\n\n**Nginx**:\n```nginx\nserver {\n    listen 443 ssl;\n    server_name wago.example.com;\n    ssl_certificate /etc/ssl/cert.pem;\n    ssl_certificate_key /etc/ssl/key.pem;\n    location / {\n        proxy_pass http://localhost:3000;\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    }\n    location /ws/ {\n        proxy_pass http://localhost:3000;\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection \"upgrade\";\n    }\n}\n```\n\n## Logs \u0026 Backup\n\n**Log rotation** with Docker:\n```yaml\nservices:\n  api:\n    image: arktnld/wago-api:latest\n    logging:\n      driver: json-file\n      options:\n        max-size: \"10m\"\n        max-file: \"3\"\n```\n\n**Session backup**: session data is stored in SQLite files at `./sessions/`. Back up this directory regularly:\n```bash\ncp -r ./sessions ./sessions-backup-$(date +%Y%m%d)\n```\n\n## Build from Source\n\nRequires Go 1.25+ and a C compiler (for SQLite).\n\n```bash\ngit clone https://github.com/arktnld/wago-api\ncd wago-api\nCGO_ENABLED=1 go build -ldflags=\"-s -w\" -o wago-api .\n./wago-api\n```\n\n## Credits\n\nBuilt on [whatsmeow](https://github.com/tulir/whatsmeow) by tulir. API design inspired by [wwebjs-api](https://github.com/avoylenko/wwebjs-api).\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farktnld%2Fwago-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farktnld%2Fwago-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farktnld%2Fwago-api/lists"}