Want to send SMS programmatically using your own phone number? Instead of paying for expensive carrier APIs, you can use your Android phone as an SMS gateway. Here's how.

The Concept

Traditional SMS APIs (Twilio, MessageBird) route messages through telecom carriers. You rent a phone number and pay per message plus monthly fees.

A phone-based SMS gateway flips this: your Android phone becomes the sending device. A server queues messages, your phone picks them up and sends via its SIM card. You keep your own number and pay your carrier's SMS rate.

What You Need

Step 1: Create Your Account

Go to mysmsgate.net/auth/register and sign up. You'll get 10 free SMS to test with — no credit card needed.

After signup, you'll see your API key on the dashboard. Copy it — you'll need it for the app and API calls.

Step 2: Install the Android App

Download and install the MySMSGate app on your Android phone:

Open the app, go to Gateway settings, and enter your API key. The app will connect to the server and show as "online" on your dashboard.

Step 3: Send SMS via API

Now you can send SMS with a single API call:

cURL

curl -X POST https://mysmsgate.net/api/v1/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+1234567890",
    "message": "Your appointment is tomorrow at 3 PM"
  }'

Python

import requests

response = requests.post(
    "https://mysmsgate.net/api/v1/send",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "to": "+1234567890",
        "message": "Your appointment is tomorrow at 3 PM"
    }
)
print(response.json())

JavaScript (Node.js)

const response = await fetch("https://mysmsgate.net/api/v1/send", {
    method: "POST",
    headers: {
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
    },
    body: JSON.stringify({
        to: "+1234567890",
        message: "Your appointment is tomorrow at 3 PM"
    })
});
const data = await response.json();
console.log(data);

PHP

$ch = curl_init("https://mysmsgate.net/api/v1/send");
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOUR_API_KEY",
        "Content-Type: application/json"
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "to" => "+1234567890",
        "message" => "Your appointment is tomorrow at 3 PM"
    ]),
    CURLOPT_RETURNTRANSFER => true
]);
$response = curl_exec($ch);
echo $response;

Step 4: Check Delivery Status

The API returns an SMS ID that you can use to check delivery status:

curl https://mysmsgate.net/api/v1/sms?id=SMS_ID \
  -H "Authorization: Bearer YOUR_API_KEY"

Statuses: pendingsendingsent (or failed with error message).

Advanced: Dual SIM & Multi-Device

If your phone has two SIM cards, you can choose which one to send from:

curl -X POST https://mysmsgate.net/api/v1/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+1234567890",
    "message": "Hello!",
    "sim_slot": 1
  }'

You can also connect multiple phones to the same account and route messages to specific devices:

{
  "to": "+1234567890",
  "message": "Hello!",
  "device_id": "your-device-id"
}

What Happens When the Phone is Offline?

Messages queue on the server. When the phone reconnects, it automatically picks up pending messages and sends them. The server also sends a push notification (FCM) to wake up the phone if it's in sleep mode.

Cost Comparison

For 500 SMS/month:

ProviderMonthly Cost
Twilio$41+ (messages + number + registration)
MessageBird$35+
MySMSGate$15 (500 × $0.03, no other fees)

That's a $300+ savings per year — and you keep your own phone number.

Try it free — 10 SMS included, no credit card required.