Blog

Build a WhatsApp Bot with Python in 10 Minutes (Free Forever)

November 3, 20262 min read33 views
Build a WhatsApp Bot with Python in 10 Minutes (Free Forever)

Python + WhatsApp is a classic stack for support bots, alerts, and AI agents. This guide uses the official Omdaa Python SDK — free forever, no Meta Cloud API verification required to start.

Series: Free Forever WhatsApp Dev · SDK: omdaa-sdk / Python

Prerequisites

  • Python 3.10+
  • Free Omdaa account → register
  • WhatsApp session linked (Dashboard QR or Cursor MCP)

Install

``bash pip install omdaa export OMDAA_API_KEY=your-api-key `

Send your first message

`python import os from omdaa import OmdaaClient

client = OmdaaClient(api_key=os.environ["OMDAA_API_KEY"])

res = client.messages.send_text( session_id="default", to="201234567890", # country code, no + message="Hello from Python + Omdaa!", ) print(res) `

Receive messages via webhook (Flask)

`python from flask import Flask, request

app = Flask(__name__)

@app.post("/webhook") def webhook(): payload = request.get_json(force=True) or {} event = payload.get("event", "") data = payload.get("data") or {}

if "message" in event: sender = data.get("from") text = data.get("text") or "" print(f"From {sender}: {text}") # Optional: reply with client.messages.send_text(...)

return ("", 200)

if __name__ == "__main__": app.run(port=8080) `

Point Omdaa to your public URL:

`python client.webhooks.set({ "url": "https://your-tunnel.example/webhook", "enabled": True, "events": ["message.received"], }) client.webhooks.test() `

Use ngrok / Cloudflare Tunnel while developing.

Add Omdaa AI (no OpenAI key required)

1. Open Dashboard → Omdaa AI 2. Bind bot to your session 3. Enable Use Omdaa AI 4. Set a short system prompt

Unlimited AI replies are included in Free Forever.

Async / automation ideas

Node twin

Same API from JavaScript:

`bash npm install @omdaafreeapi/omdaa-api-client ``

Resources

Omdaa API — Free Forever. Ship a Python WhatsApp bot before your coffee cools.