Key Takeaways
- Ruby receive webhook for Android SMS gateway: expose HTTPS, verify signature, ack fast, process async — inbound still requires an online paired phone.
- Use Net::HTTP / Faraday against REST. Not an official Ruby gem “complete SDK” product.
- Priced by devices and SMS send volume. You use your own phone and operator SMS credit. Two-way does not remove operator credit on outbound replies.
- Free 300 SMS lifetime still meters outbound you trigger from handlers.
- Idempotent handlers — webhooks may retry.
- Developer Center owns live webhook fields.
How to receive webhooks in Ruby from an Android SMS gateway: the SIM gets the reply, the app posts JSON to your endpoint, your Rails/Sinatra app acts. Related: Webhooks. Two-way SMS. Rails controllers.
Priced by devices and SMS send volume. You use your own phone and operator SMS credit.
A perfect Ruby controller cannot invent inbound SMS while the handset is in a drawer with battery saver killing the gateway app.
Inbound SMS → webhook → Ruby
Register the URL via API/panel. Confirm event names and signature header in Developer Center. Return 2xx quickly.
Endpoint checklist
| Concern | Ruby practice | Failure |
|---|---|---|
| TLS URL | Public HTTPS | Localhost only |
| Signature | HMAC verify before parse trust | Forged posts |
| Ack | 200 then Sidekiq/job | Timeouts → storms |
| Idempotency | Dedupe event id | Double replies |
Verify signatures
Check X-SmsGateway-Signature (or current documented header) before mutating state. Reject on mismatch.
REST only — not a Ruby gem SDK
Outbound replies are another HTTPS POST. Do not market a thin gem as an official complete SDK. C# / PHP site samples are the same idea — recipes.
Device online for two-way
Inbound needs the app registered. Monitor last-seen — multi-device.
Related reading
Ruby send SMS. Webhooks API usage.
Checklist
- HTTPS endpoint registered.
- Signature verified.
- Fast 2xx + background job.
- Event dedupe.
- Phone online SOP.
- No official gem SDK claim.
Next steps
Reply to a staff inbound canary, then size devices + volume.
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





