OpenAPI 3.0 Compatible • Android Telephony Node
Developer API & App Integration
Connect any mobile application, frontend, or backend server to your physical Android SMS Gateway. Send high-throughput OTPs, transactional notifications, and verification codes directly through local SIM carrier radio.
Production Serverless Edge Base URL
https://api.smsgatewayoffical.online
Hardware Overview: This node runs in the background of your dedicated Android smartphone, exposing local telephony basebands to the REST API and Firebase Realtime Database queue.
≡ REST API v2.4
⚡ Firebase RTDB Queue
📶 Local Port 8080 / 8084
🔋 WakeLock CPU Shield
SIM SLOT 0 (Primary)
● Signal 99%
Reliance Jio 5G
Unlimited SMS Plan • Rssi -62 dBm
SIM SLOT 1 (Secondary)
● Signal 96%
Airtel 4G LTE
Failover SIM • Rssi -71 dBm
Interactive Live SMS Dispatcher
Test message execution in real-time. This fires directly to your running gateway endpoint.
TEST LIVE API
Authentication & API Keys
Authenticate every HTTP API request with your secret Bearer token via the X-API-Key or standard Authorization: Bearer header.
X-API-Key:
🤖
Android App Integration (Kotlin & Java)
Native Android SDK using OkHttp / Coroutines
Integrate SMS dispatching directly into your Android application (e.g. food delivery, fintech, ride hailing) to send OTPs and receipts:
Kotlin (Android Coroutine + OkHttp):
// Add to build.gradle: implementation("com.squareup.okhttp3:okhttp:4.12.0")
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import okhttp3.MediaType.Companion.toMediaType
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.RequestBody.Companion.toRequestBody
import org.json.JSONObject
suspend fun sendSmsViaGateway(phone: String, message: String, apiKey: String): Boolean = withContext(Dispatchers.IO) {
val client = OkHttpClient()
val json = JSONObject().apply {
put("phoneNumber", phone)
put("message", message)
put("simSlot", 0) // 0 for SIM 1, 1 for SIM 2
put("priority", "HIGH")
}
val body = json.toString().toRequestBody("application/json; charset=utf-8".toMediaType())
val request = Request.Builder()
.url("https://api.smsgatewayoffical.online/api/send-sms")
.addHeader("X-API-Key", apiKey)
.addHeader("Content-Type", "application/json")
.post(body)
.build()
client.newCall(request).execute().use { response ->
response.isSuccessful
}
}
Java (HttpURLConnection, zero dependencies):
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
public class SmsSender {
public static int sendSms(String phone, String msg, String apiKey) throws Exception {
URL url = new URL("https://api.smsgatewayoffical.online/api/send-sms");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type", "application/json");
conn.setRequestProperty("X-API-Key", apiKey);
conn.setDoOutput(true);
String jsonPayload = String.format("{\"phoneNumber\":\"%s\",\"message\":\"%s\",\"simSlot\":0}", phone, msg);
try (OutputStream os = conn.getOutputStream()) {
os.write(jsonPayload.getBytes(StandardCharsets.UTF_8));
}
return conn.getResponseCode(); // 200 OK
}
}
💙
Flutter / Dart App Integration
Cross-Platform iOS & Android Apps using http package
Send SMS messages directly from your Flutter mobile apps to any phone worldwide without third-party aggregator markups:
// Add to pubspec.yaml: http: ^1.2.0
import 'dart:convert';
import 'package:http/http.dart' as http;
Future<Map<String, dynamic>> dispatchGatewaySms({
required String phoneNumber,
required String message,
required String apiKey,
int simSlot = 0,
}) async {
final url = Uri.parse('https://api.smsgatewayoffical.online/api/send-sms');
final response = await http.post(
url,
headers: {
'Content-Type': 'application/json',
'X-API-Key': apiKey,
},
body: jsonEncode({
'phoneNumber': phoneNumber,
'message': message,
'simSlot': simSlot,
'priority': 'HIGH',
}),
);
if (response.statusCode == 200) {
return jsonDecode(response.body);
} else {
throw Exception('SMS Gateway Error: ${response.statusCode} - ${response.body}');
}
}
⚛️
React Native / Expo Integration
TypeScript & JavaScript Mobile Apps using Fetch
export async function sendOtpSms(phoneNumber: string, otpCode: string, apiKey: string) {
const response = await fetch('https://api.smsgatewayoffical.online/api/send-sms', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': apiKey,
},
body: JSON.stringify({
phoneNumber,
message: `Your verification code is ${otpCode}. Do not share this with anyone.`,
simSlot: 0,
priority: 'HIGH'
})
});
const data = await response.json();
if (!response.ok) {
throw new Error(data.error || 'Failed to dispatch SMS');
}
return data; // { status: "SUCCESS", requestId: "sms_...", ... }
}
🟢
Backend Servers: Node.js & Python
Server-side API integration for Web Apps and Cloud Functions
Node.js / Express (Native Fetch / Axios):
import fetch from "node-fetch";
async function sendSms(phone, message, apiKey) {
const res = await fetch("https://api.smsgatewayoffical.online/api/send-sms", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": apiKey
},
body: JSON.stringify({
phoneNumber: phone,
message: message,
simSlot: 0
})
});
return await res.json();
}
Python (Requests / FastAPI / Django):
import requests
def send_gateway_sms(phone: str, message: str, api_key: str):
url = "https://api.smsgatewayoffical.online/api/send-sms"
headers = {
"Content-Type": "application/json",
"X-API-Key": api_key
}
payload = {
"phoneNumber": phone,
"message": message,
"simSlot": 0
}
response = requests.post(url, json=payload, headers=headers, timeout=10)
return response.json()
🐘
PHP & Laravel Integration
For WooCommerce, WordPress, and Custom PHP Web Portals
<?php
// Plain PHP cURL or Laravel Http::post
$apiKey = "YOUR_API_KEY";
$data = [
"phoneNumber" => "+919876543210",
"message" => "Your order #1089 has been confirmed!",
"simSlot" => 0
];
$ch = curl_init("https://api.smsgatewayoffical.online/api/send-sms");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"X-API-Key: " . $apiKey
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
🔥
Zero-Backend: Firebase RTDB Direct Queue
Push directly to Firebase — no server hosting required!
Don't have a backend server? Any client app (React, Flutter, Android, iOS) can push directly to the Firebase Realtime Database. The Android SMS Gateway User App listens 24/7 to the queue and immediately dispatches the SMS via SIM radio within 100 milliseconds!
// JavaScript / Firebase Web SDK v9+
import { getDatabase, ref, push } from "firebase/database";
const db = getDatabase();
const outgoingRef = ref(db, "outgoing_sms");
// Push to queue — Android device hardware gateway picks it up instantly!
push(outgoingRef, {
phoneNumber: "+919876543210",
message: "Your OTP is 921048. Powered by SMS Gateway Official.",
simSlot: 0,
apiKey: "YOUR_API_KEY",
status: "PENDING",
timestamp: Date.now()
});
POST
/api/send-sms
Dispatches a single SMS or verification OTP directly through the connected device hardware SIM radio.
Request Body Parameters (JSON)
| Field |
Type |
Required |
Description |
phoneNumber |
string |
Yes |
Recipient's phone number in E.164 format (e.g. +919876543210) or 10-digit number. |
message |
string |
Yes |
SMS body text. Supports standard ASCII (160 chars) and Unicode / emojis (70 chars per part). |
simSlot |
integer |
Optional |
Target SIM card: 0 for SIM 1, 1 for SIM 2. Defaults to active default SIM. |
priority |
string |
Optional |
Queue priority: "HIGH" (for OTPs/verification), "NORMAL", or "LOW". |
Sample Response (200 OK)
{
"status": "SUCCESS",
"code": 200,
"requestId": "sms_84920194a",
"recipient": "+919876543210",
"simSlot": 0,
"simCarrier": "Reliance Jio 5G",
"smsParts": 1,
"deliveryReceipt": "DELIVERED",
"latencyMs": 38,
"timestamp": 1728130092100
}
GET
/api/status/{id}
Retrieve the real-time carrier delivery receipt and telephony dispatch status for a specific message request ID.
{
"requestId": "sms_84920194a",
"status": "DELIVERED",
"deliveredAt": 1728130092450,
"carrierACK": "RADIO_ACK_SUCCESS",
"signalRssiDbm": -68
}
GET
/api/balance
Inspect node health, registered SIM status, daily quota utilization, and account status.
{
"status": "ACTIVE",
"smsBalance": "UNLIMITED",
"dailyLimit": 5000,
"sentToday": 1420,
"deviceOnline": true,
"batteryPercent": 96,
"activeSimSlots": 2
}
Real-Time Inbound SMS Webhooks
Configure your webhook endpoint in your gateway settings to receive instant HTTP callbacks when an inbound SMS arrives in the device SIM tray or when delivery receipts update.
{
"event": "sms.received",
"sender": "+919876543210",
"message": "YES, confirm transaction request #9281.",
"simSlot": 0,
"carrier": "Reliance Jio 5G",
"receivedAt": 1728130120000,
"signature": "sha256=d8f92014b09c..."
}
Webhook Cryptographic Verification
Every webhook payload contains an X-Gateway-Signature header generated using HMAC-SHA256:
signature = hmac_sha256(webhook_secret, request_raw_body)
Error Codes Reference
Standard RFC-compliant HTTP status codes returned by the gateway:
| Code |
Error Name |
Description |
200 OK |
SUCCESS |
SMS handed off to Android baseband GSM transceiver successfully. |
400 BAD REQUEST |
INVALID_PHONE |
Recipient phone number is invalid or missing international prefix. |
401 UNAUTHORIZED |
INVALID_API_KEY |
Missing or incorrect API key in X-API-Key header. |
429 RATE LIMIT |
CARRIER_THROTTLE |
Daily carrier quota exceeded or frequency threshold triggered. |
503 UNAVAILABLE |
DEVICE_OFFLINE |
Android phone is asleep or out of mobile network range. |