Key Takeaways
- Django sends OTP by HTTPS from a worker with secrets in env. The Android SIM delivers. Recipients see your number.
- Cache a hash of the code, not the code. TTL in Django; do not schedule OTP SMS.
- Celery retries without idempotency keys are duplicate codes and burned airtime.
- Confirm live JSON in Developer Center. This is not a Django SMS SDK package.
- You bring the phone and operator credit. Platform pricing is devices plus send volume.
Django SMS gateway OTP is your auth app plus a paired Android. Hub: OTP, how it works, Developer Center. Templates: OTP templates.
You bring the handset and airtime. Devices and send volume. REST samples are HTTPS/JSON — not a Complete SDK.
View · Celery · SIM
Django owns OTP; the phone owns GSM
Views/forms issue codes. Settings hold no tokens — env does. Keys in env. Pair the APK. Install.
If Celery is down, Django should fail closed — not print the OTP in an email “just this once.”
Layer table
| Layer | Job | Failure |
|---|---|---|
| Django | Hash, TTL, rate-limit user | Plaintext code in Redis |
| Celery | One send, idempotent | Retry storm |
| HTTPS API | Accept job | Stale fields |
| Android + SIM | Transmit | OEM / prepaid |
Celery is not a second radio
Pace workers to one OTP device (2 on Starter includes a spare chassis, not two radios in one phone). Queue: backlog.
Hash the code
Compare hashes on submit. Webhooks: webhooks, DLR. Retriever on the mobile app is separate (SMS Retriever).
Twilio contrast
Aggregator: rented from-number, per-message. Here: your SIM, operator bill, device+volume fee. Comparison. Messaging practices. Health: device health.
Next steps
Hash + Celery + one canary to a staff MSISDN. Spend 300 lifetime SMS proving the path — then a funded production SIM.
Related product pages
Jump to the live product docs for this topic—not another long-form article.
- OTP and 2FA SMS on AndroidAuthentication flows
- SMS API documentationLive endpoint reference
- device and SMS volume pricingPlans and allowances
- Android SMS gateway product guideDefinition, product, and how to buy





