Key Takeaways
- Kotlin OTP through an Android SMS gateway is server-side HTTPS/JSON to POST /messages — Bearer from env, never from the mobile APK.
- Confirm live fields in Developer Center. We do not ship a Kotlin SDK product.
- Secure random digits, short GSM-7 wrappers, Idempotency-Key per challenge, cap resends.
- SMS Retriever hashes live on the receiving app. The gateway still sends from your SIM MSISDN.
- You bring the phone and operator credit. Platform pricing is devices plus send volume.
Kotlin on the server
Hub: Android SMS gateway API. Product OTP: OTP on Android. Language: kotlinlang.org. Live JSON: Developer Center.
We meter devices and volume. A Ktor client does not include pulsa. Starter, Professional, and Business list Unlimited SMS as platform send volume; that is not unmetered carrier SMS.
HTTPS send, not a Kotlin SDK
POST /api/v1/messages with to and a short text. Same contract as PHP samples. USSD balance checks are a different path (POST /ussd) — not OTP.
“If the OTP secret lives in the Android app that the user installed, you did not add 2FA. You published a send key.”
OTP failure modes
| Symptom | Likely cause | First check |
|---|---|---|
| Double codes | Retry without Idempotency-Key | Key = user + challenge id |
| Slow login during a sale | OTP on the campaign device | Named OTP pool |
| Two-segment OTP | Unicode wrapper / long brand line | GSM-7 digits; hash on its own line |
| Retriever never fires | Wrong hash / wrong From | SMS Retriever |
| 200, user empty | Accept ≠ delivered | DLR |
SMS Retriever is the client
The receiving app computes a hash. The sending SIM must be the number that hash expects. Pairing: setup. Webhooks: webhooks.
Vs rented-number OTP
CPaaS: per-message + rented From. Twilio vs Android. You: operator airtime + device/volume fee. Pricing.
Next steps
Canary a staff number from the backend. Confirm Retriever on a debug build. Operator credit stays yours.
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





