Android • SMS Gateway

Auto SMS Dispatcher — send via your SIM bundle, pay very low rates

Use an Android phone as a reliable SMS gateway. The app pulls messages from your server queue and sends them using the mobile operator’s **bundle/off-net offers**, so cost stays tiny—no SMPP fees.

Auto SMS Dispatcher screenshot showing API key, pending SMS, toggles, delay time and threshold
Screenshot: API key auth, pending queue, sound on send, delay for bulk, delay time (sec), and threshold before applying delay.

Why this gateway?

API-key secured

The phone polls your server with a **unique API key**; only authorized devices can send.

Low-cost bundles

Leverages operator **bundle/pack offers** on the SIM for extremely low per-SMS cost.

Delay & threshold

Enable **delay for bulk** with a per-message delay (seconds) and a **threshold** that decides when to slow down.

Sound & status

Optional **sound on send**. Clear states: “Pending SMS”, “No SMS to send”.

Safe sending

Rate-limit via delay, auto-retry on temporary failures, and **delivery reporting** back to your server.

Simple to integrate

Minimal REST endpoints: **enqueue**, **poll**, **report**. Examples below.

How it works

  1. Install the **Auto SMS Dispatcher** APK on an Android phone with a SIM that has an SMS bundle/pack.
  2. Open the app, enter your **API Key** (from your server), enable optional **sound** and **delay** controls.
  3. The app **polls** your server for pending SMS, sends via the SIM, and posts **delivery reports**.
Queue format (server DB table)
CREATE TABLE sms_outbox (
  id BIGINT AUTO_INCREMENT PRIMARY KEY,
  api_key VARCHAR(64) NOT NULL,
  phone VARCHAR(20) NOT NULL,
  message TEXT NOT NULL,
  status ENUM('pending','sent','failed') DEFAULT 'pending',
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  sent_at TIMESTAMP NULL,
  error TEXT NULL
);
You can adapt to your existing DB — the app only needs the API endpoints below.
Minimal API (examples)
# 1) ENQUEUE (server receives request)
POST /api/sms/enqueue
key=YOUR_API_KEY&to=017XXXXXXXX&text=Hello

# 2) POLL (device asks for work)
GET /api/sms/poll?key=YOUR_API_KEY&limit=10
[
  {"id":101,"to":"017XXXXXXXX","text":"Hello","delay_after_sec":5},
  ...
]

# 3) REPORT (device reports result)
POST /api/sms/report
key=YOUR_API_KEY&id=101&status=sent   # or failed&error=reason
Return HTTP 401 for wrong keys. Use delay_after_sec to honor the app’s bulk delay.
PHP: ultra-simple enqueue
<?php
// /api/sms/enqueue
require 'db.php'; // $pdo (PDO)
$key = $_POST['key'] ?? '';
$to  = $_POST['to']  ?? '';
$txt = $_POST['text']?? '';
if ($key !== 'YOUR_API_KEY') { http_response_code(401); exit; }
$stmt = $pdo->prepare("INSERT INTO sms_outbox(api_key,phone,message) VALUES (?,?,?)");
$stmt->execute([$key,$to,$txt]);
echo json_encode(['status'=>'queued','id'=>$pdo->lastInsertId()]);
Device best-practice
  • Disable battery optimization & allow auto-start for the app.
  • Keep the phone on stable power/Wi-Fi where signal is strong.
  • Use bundles that fit your traffic pattern for **lowest cost**.
  • Respect all local messaging/consent regulations.