Skip to main content

waservix

Python client for the WAservix WhatsApp API Gateway.

WAservix links your own WhatsApp number by QR code (the same way WhatsApp Web does) and gives you a REST API to send text, images, video, audio, documents, locations, polls and more, with webhooks for incoming messages and status updates.

  • Zero dependencies (standard library only), Python 3.8+
  • Works in Django, Flask, FastAPI, scripts and cron jobs
  • Webhook check built in

Install

pip install waservix

Quick start

Copy your device's API key from the WAservix dashboard (Devices -> API key) and keep it on your server.

import os
from waservix import WAservix

wa = WAservix(api_key=os.environ["WASERVIX_KEY"])

result = wa.send_text("+15551234567", "Hello Aline, your order is ready")
print(result["msgId"], result["status"])  # 58213 in_progress

Sending

Messages are queued and sent one at a time per number, so each call returns right away with status: "in_progress" and a msgId.

# Image with caption
wa.send_image("+15551234567", "https://example.com/product.jpg", caption="Back in stock")

# Document
wa.send_document("+15551234567", "https://example.com/inv-1042.pdf",
                 file_name="Invoice-1042.pdf", caption="Your invoice")

# Anything the API supports, including groups (JID ending in @g.us)
wa.send_message("120363040000000000@g.us", text="Team meeting at 3pm")
wa.send_message("+15551234567", location={"latitude": -1.9441, "longitude": 30.0619, "name": "Our shop"})

Status, contacts and groups

info = wa.get_message_info(58213)      # queued, sent, delivered, read, played or failed
check = wa.on_whatsapp("+15551234567")  # {"exists": True, "jid": "..."}
conn = wa.get_status()                  # {"status": "connected"}

wa.edit_message(58213, "Corrected text")  # own text messages, about 15 minutes
groups = wa.list_groups()

Anything else in the API reference is one call away:

wa.request("POST", "/messages/read", {"msgId": "3EB0X123456789"})

Webhooks

Set a webhook URL and events for the number in the dashboard. Each request carries X-Webhook-Signature, which equals the device's webhook secret. Flask example:

import os
from flask import Flask, request, abort
from waservix import verify_webhook

app = Flask(__name__)

@app.post("/wa/webhook")
def wa_webhook():
    if not verify_webhook(request.headers.get("X-Webhook-Signature"), os.environ["WASERVIX_WEBHOOK_SECRET"]):
        abort(401)
    payload = request.get_json()
    if payload["event"] == "messages.received":
        m = payload["data"]["messages"]
        print(m["key"]["cleanedSenderPn"], m["messageBody"])
    return "", 200  # acknowledge fast; queue slow work

Errors

Failed calls raise WAservixError with status, message, field errors and, on 429, retry_after in seconds. A 503 means the device is reconnecting: retry shortly.

Never ship the key inside a browser or mobile app: anyone could read it. Call the API from your server.

Migrating from WaSender

WAservix accepts the same /send-message body and webhook fields as WaSender, so most integrations switch by changing the base URL and key. See the compatibility notes.

Use it responsibly

WAservix is not Meta's official WhatsApp Business Platform. There's no business verification and no per-conversation fee, but WhatsApp's spam rules apply to your number directly. Message people who expect to hear from you, warm up new numbers slowly and keep the built-in account protection on.

More from Tekservix

  • SMS Gora SMS Gateway: send SMS through your own Android phones (pip install smsgora)
  • AI Sales Agent: answers customers on WhatsApp and SMS using your website's content
  • Website to App: turn your website into Android and iOS apps
  • Also on npm: npm install waservix

License

MIT

Metadata

Release files for waservix 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for waservix 1.0.0
File Size Uploaded Provenance Actions
waservix-1.0.0.tar.gz 7.5 kB Without provenance Details for waservix-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for waservix 1.0.0
File Interpreter ABI Platform Actions
waservix-1.0.0-py3-none-any.whl Python 3 none any Details for waservix-1.0.0-py3-none-any.whl

Total release size: 14.1 kB

Release files / waservix-1.0.0.tar.gz

Download URL waservix-1.0.0.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8d76517651b0b7e723887940a8fb4f1b64725f6fad04dbc9aa35eebb2568132d
BLAKE2b-256 checksum
How to use checksums
b245230c4cfd0dc1fa4086bf8dd9c35d1d643a4c85f2a2f29e7ec0c9f9d69ad3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / waservix-1.0.0-py3-none-any.whl

Download URL waservix-1.0.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ccb913e1c1965fc1afb29ee555bcd7714b2257dd159af2b6fafa13553193eb2
BLAKE2b-256 checksum
How to use checksums
bba3754c1076cc66a05a1ed6b70551338e9085fd42cf158aa58e51b825ca9c23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for waservix 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page