Key Takeaways
- Ruby send OTP via Android SMS gateway is Net::HTTP / Faraday HTTPS JSON — not an official Rubygems “SMS Gateway SDK.”
- Confirm live fields in Developer Center. HTTP 200 is accepted, not delivered.
- Pin Idempotency-Key to user+challenge. Short TTL lives in your app.
- Isolate OTP deviceIds from promo. Keys in env/credentials, never the repo.
- You bring the Android and operator SMS credit. We meter devices and send volume.
Net::HTTP OTP, not a gem SDK
Ruby Android SMS gateway API send OTP: POST JSON with a Bearer token, store the id, enforce TTL and attempt limits in your app. Hub: Android SMS gateway API. Product OTP: OTP verification. Live fields: Developer Center.
If your Gemfile says “sms-gateway-official,” you invented a package we do not publish.
REST only
Faraday or Net::HTTP is fine. A thin client gem you maintain is fine. Do not brand it as our SDK product. Language samples cousins: PHP HTTPS/JSON, C# HTTPS/JSON. External: Ruby Net::HTTP.
OTP send duties
| Layer | Owns | Must not |
|---|---|---|
| Ruby app | Code gen, TTL, rate limits, Idempotency-Key | Log full OTP bodies to shared logs |
| Control plane | Queue, device routing, webhooks | Supply operator airtime |
| Android + SIM | GSM submit | Share the promo CSV modem |
Idempotency and TTL
Same key on retry for the same challenge. Accept ≠ delivered — wire DLR. Multi-device: multi-device and dual SIM.
Cost
Devices plus SMS send volume. Operator airtime is yours. OTP retries still debit the SIM. Free: 1 device / 300 SMS lifetime. Starter, Professional, and Business list Unlimited SMS as platform send volume; that is not unmetered carrier SMS.
Checklist
- Keys in credentials/env; timeouts set.
- Idempotency-Key stable per challenge.
- OTP deviceIds isolated; ASCII bodies when possible.
- Persist id; DLR/webhook path tested.
- Developer Center fields confirmed.
Next steps
devices and SMS volume, setup, Ruby send SMS.
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





