Sitemap

Sending SMS Notifications: The Actually Free Way (Using Your Own Phone)

4 min readMay 23, 2025

--

If you’ve ever attempted to deploy SMS OTPs or notifications, you’ve likely run into a brick wall. Either the free tier isn’t generous enough, or production costs silently add up — particularly if your users are worldwide.

I recently came across a gem that turns the equation on its head.

No APIs to pay for. No bills to pay each month. Just your phone and some intelligent routing.

Let me demonstrate how.

Why SMS OTPs Still Matter

Even in an age of push notifications and email codes, SMS OTPs are still a pillar of digital security. They’re:

Quickly ✅ Universal ✅ Compatible with almost all phones ✅

But there’s a catch: most SMS gateways are pricey when in production. Twilio, MessageBird, AWS SNS — they all bill per SMS, and prices add up quick with scale or international sends.

What if you could bypass the gatekeepers and send SMS from your own device instead?

Meet sms-gate: A Zero-Cost, Self-Hosted SMS Sender

I found sms-gate while rummaging through dark GitHub corners and specialist developer utilities. It’s a small, self-hosted utility that bridges between your Android phone and sends SMS using Firebase Cloud Messaging (FCM).

Here’s the central concept:

  1. Your server pushes a message to your phone via FCM.
  2. The sms-gate Android app intercepts the message.
  3. The app forwards the SMS using your phone’s SIM card.

Done.

✅ No API fees. No rate limiting. Just your carrier plan.

How It Works (The Tech Flow)

Under the hood, sms-gate is quite smart:

It employs FCM (Firebase Cloud Messaging) for real-time messaging between your server and the Android app.

The Android app picks up these FCM messages and sends them on as SMS over your local SIM.

The outcome? A free, private, self-hosted SMS API — with no third-party fees.

Press enter or click to view image in full size
Overall Workflow

It’s ideal for:

Devs testing OTP flows

Indie projects with a tight budget

Internal tools that require SMS alerts

Remote logging, uptime notifications, or whatever can use SMS — without having to rely on Twilio or the like.

Get Your Hands on It

Ready to try it out? Here’s how you can start sending SMS notifications in minutes — without paying for an SMS API.

Install the Android App
Head over to the official sms-gate Android app and install it on the device that will act as your SMS gateway.
This device will send the messages using its SIM, so make sure it’s on and connected.

Note: This phone needs to stay online and have access to your carrier network to send messages reliably.

Get Your Server Credentials

  1. Go Online
    Launch app → Toggle “Cloud Server”
  2. Go Online
    Tap the "Offline" button → Becomes "Online"
  3. Get Credentials
    They will be generated by the server.

Once set up, you’ll receive:

You can send a Test SMS Notification with component below:

Click here to Redirect to the Tester Component.

The Tradeoffs You Should Be Aware Of

Nothing is ever 100% perfect. Here are a few caveats to bear in mind:

  1. Your Number Is the Sender
    The SMS goes out from your individual number (the SIM in your phone). This may not be suitable for:
  2. Production applications with users
  3. Privacy-sensitive applications
  4. Certain carriers might support masking or business IDs — get in touch with yours.
  5. International SMS Charges Might Apply
    You’re still on your carrier plan. So although the tool is free, international SMS fees may appear on your phone bill.

Making SMS API Modular for Future Swaps

To future-proof your SMS system and support switching providers (e.g., from a local gateway to Twilio, Msg91, etc.), use the adapter pattern.

/lib/sms/
- adapter.ts // Interface definition
- smsGateAdapter.ts // Your SMS-Gate/local implementation
- twilioAdapter.ts // Real provider
- index.ts // Adapter loader
  1. adapter.ts – Define the Interface
// lib/sms/adapter.ts
export type SMSPayload = {
to: string;
message: string;
};

export interface SMSAdapter {
sendSMS: (payload: SMSPayload) => Promise<void>;
}

2. smsGateAdapter.ts – Your Local/SMS-Gate Adapter

// lib/sms/smsGateAdapter.ts
import { SMSAdapter, SMSPayload } from "./adapter";

export const smsGateAdapter: SMSAdapter = {
async sendSMS({ to, message }: SMSPayload) {
console.log(`[SMS][SMS-Gate] To: ${to} | Msg: ${message}`);
// Example: send to local API or log for dev
// await fetch("http://localhost:3000/sms", { method: "POST", body: JSON.stringify({ to, message }) });
},
};

3. twilioAdapter.ts – Real Provider Example

// lib/sms/twilioAdapter.ts
import { SMSAdapter, SMSPayload } from "./adapter";
import twilio from "twilio";

const client = twilio(process.env.TWILIO_SID!, process.env.TWILIO_TOKEN!);

export const twilioAdapter: SMSAdapter = {
async sendSMS({ to, message }: SMSPayload) {
await client.messages.create({
to,
from: process.env.TWILIO_PHONE!,
body: message,
});
},
};

4. index.ts – Load Adapter via Env

// lib/sms/index.ts
import { smsGateAdapter } from "./smsGateAdapter";
import { twilioAdapter } from "./twilioAdapter";
import { SMSAdapter } from "./adapter";

export const sms: SMSAdapter =
process.env.SMS_PROVIDER === "twilio" ? twilioAdapter : smsGateAdapter;

Usage Example

// anywhere in your code
import { sms } from "@/lib/sms";

await sms.sendSMS({
to: "+923001234567",
message: "Your OTP is 4242",
});

Final Thoughts

If you’re making something small, experimental, or budget-conscious, — this is one of the most clever tools I’ve discovered in some time.

No underhanded freemium walls. No surprise billing per month. Just your own infrastructure and phone, together.

It’s a gem to find — and well worth keeping in your dev arsenal.

Have questions? Let’s connect.

--

--