Key Takeaways
- Send SMS with TypeScript against an Android gateway via fetch/HTTP — REST JSON, not an official TypeScript SDK package.
- Version your thin client; pin live fields to Developer Center.
- Accept ≠ delivered; wire DLR or webhooks with signature checks.
- Keep keys server-side; never in browser bundles.
- Devices + SMS volume pricing; Free is 1 device / 300 SMS lifetime; BYO Android and operator credit.
TypeScript talks REST
Sending SMS with TypeScript on an Android SMS gateway means your Node (or Bun) service POSTs JSON with a Bearer token. There is no official npm “complete TypeScript SDK” to version from us — you own a thin fetch wrapper. The phone still sends on your SIM.
Confirm schemas in API docs. Hub: Android SMS Gateway API. Pricing: devices + volume; Free is 1 device / 300 SMS lifetime.
“If every microservice imports a copy-pasted fetch snippet, the next field rename becomes five outages. One adapter module is the product — not an imaginary SDK version.”
Thin client pulse
1
fetch POST
2
Persist id
3
Webhook
4
DLR map
Layers to own
| Layer | Own? | Notes |
|---|---|---|
| Thin REST client | Yes | Timeouts, auth header, idempotency key |
| OTP / domain logic | Yes | Above the adapter |
| Webhook verifier | Yes | Raw body + signature |
| Official TS SDK | No | Not a product we ship |
| Operator airtime | You | Not included in platform fee |
Thin fetch wrapper
Conceptual pattern only — paths and fields must match Developer Center:
// Conceptual — not an SDK; confirm fields in Developer Center
export async function sendSms(to: string, text: string, idempotencyKey: string) {
const res = await fetch(process.env.SMS_GATEWAY_URL + '/messages', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SMS_GATEWAY_TOKEN}`,
'Content-Type': 'application/json',
'Idempotency-Key': idempotencyKey,
},
body: JSON.stringify({ to, text }),
});
if (!res.ok) throw new Error(`send failed: ${res.status}`);
return res.json();
}Workers, not request threads
Do not block HTTP handlers on radio latency. Queue OTP and bulk. Pace to OEM rate ceilings and carrier fair-use. Isolate OTP from promotional workers.
Webhooks in Node
Verify signatures over the raw body; persist event ids; return 2xx quickly. Webhook guide.
Secrets
Env only. Rotate on staff change. Never embed tokens in Next.js public env.
Pricing
Devices + send volume. Free: 1 device / 300 SMS lifetime. Samples in other languages remain REST, not SDKs — PHP, C#.
Next steps
Related product pages
Jump to the live product docs for this topic—not another long-form article.
- SMS API documentationLive endpoint reference
- device and SMS volume pricingPlans and allowances
- Android SMS gateway product guideDefinition, product, and how to buy
- download the Android gateway appGet the APK





