Key Takeaways
- Receive Android SMS gateway webhooks in Python (Flask/FastAPI/Django) over HTTPS — verify signatures before mutating state.
- Webhooks report radio reality (delivered/failed/received); they are not Meta WhatsApp callbacks.
- Return 2xx quickly; enqueue slow work.
- You need a working Android phone with a SIM and SMS credit from your mobile operator. Operator message costs are yours—we do not sell carrier SMS balance. Service pricing is based on device count and total SMS sent through the gateway.
- Free canaries: 300 SMS lifetime — not Unlimited SMS.
Hub C: Python android sms gateway api receive webhook. Product guide: webhooks. Docs: SMS API documentation. Send sibling: Python send SMS.
You need a working Android phone with a SIM and SMS credit from your mobile operator. Operator message costs are yours—we do not sell carrier SMS balance. Service pricing is based on device count and total SMS sent through the gateway. Pricing.
What the webhook delivers
Delivery and inbound events (names per OpenAPI) — e.g. delivered/failed/received. Your Android SIM is still the radio; Python only consumes JSON.
Verify HMAC on the raw body before json.loads trust. Unsigned payloads are hostile traffic.
Verify signatures in Python
Use the documented header and secret. Constant-time compare. Reject early. Register URLs with webhook setup.
Handler checklist
| Step | Required | Failure mode |
|---|---|---|
| TLS endpoint | Yes | Gateway cannot post |
| Signature verify | Yes | Forged events |
| Idempotent upsert | Yes | Duplicate side effects |
| Fast 2xx | Yes | Retries / marked unhealthy |
| Async heavy work | Recommended | Timeouts under load |
At-least-once delivery
Dedupe on event/message id. Precedence: do not overwrite Delivered with a late Pending. DLR overview: delivery reports.
Ship checklist
- Staging webhook URL.
- Secret in env — not git.
- Unit test signature vectors.
- Canary send → event observed.
Next steps
Pair device (setup), send staff SMS, confirm handler.
Related product pages
Jump to the live product docs for this topic—not another long-form article.
- SMS webhook integrationInbound and status events
- SMS API documentationLive endpoint reference
- device and SMS volume pricingPlans and allowances
- Android SMS gateway product guideDefinition, product, and how to buy




