Device pairing & heartbeat sync
Pair phones with a short-lived code. Heartbeats keep battery, SIM, GPS, and online status fresh so the control plane always knows what’s live.
Open-source · Self-hosted · Apache 2.0
Turn Android phones into an API-driven SMS gateway
Pair real devices with a Django API and React dashboard. Send OTP, transactional SMS, and USSD—on SIMs you control.
Capabilities
From pairing and OTP to USSD, webhooks, and agent security—each piece of DeviceFlow is built for operators who want API control on real SIMs.
Pair phones with a short-lived code. Heartbeats keep battery, SIM, GPS, and online status fresh so the control plane always knows what’s live.
Send one-time codes for signup and 2FA with mode: "otp". Real SIM routes, project scoping, and delivery status your auth stack can trust.
Order confirmations, receipts, and account alerts through a REST API. Templates and project keys keep product messaging clean and auditable.
Campaign send for announcements and outreach when you need volume—still self-hosted, still on your SIMs, with queue visibility in the dashboard.
Watch online status, queues, battery, and dual-SIM health in real time over WebSockets. Ops sees the fleet the moment something drifts.
Route by SIM slot and operator. Keep failover paths ready when one carrier falters—ideal for multi-country or multi-operator fleets.
Run carrier USSD codes from the web UI. Balance checks, top-ups, and ops flows without touching the handset every time.
Scoped API keys per project plus outbound webhooks for delivery and inbox events. Wire DeviceFlow into your backend without polling forever.
Import contacts, read inbound SMS, and follow conversation threads. Support and ops stay in one place with the devices that sent the messages.
Prefer operators, SIM slots, and projects with rules that match how your fleet is deployed—less guesswork when a message has to land.
Agent app can hide from the launcher and require a UI passcode. Physical access to the phone does not mean open access to the agent.
Reveal the agent with a dialer code like *#*#CODE#*#*. Field techs unlock the app without a visible launcher icon on the home screen.
Extend the control plane with automations and plugins. Trigger follow-ups, hooks, and custom logic when devices or messages change state.
Ops views for send volume, GPS map pins from agents, and queue depth. See bottlenecks before they become outages.
How to use
Run the stack, pair a phone, attach it to a project, then send from your backend while Live Monitor watches the fleet.
Step 1
Start the Django API and React dashboard locally or with Docker Compose. Redis backs WebSockets and queues when you want the full ops stack.
Step 2
Generate a pairing code in the dashboard. The Kotlin agent posts it once and receives a device token—no long-lived WebSocket required.
Step 3
Assign the device to a project, then mint a project API key. Routing, templates, and webhooks all hang off that project boundary.
Step 4
Call the REST API with mode: "otp" (or transactional / bulk). Your app stays the source of truth; DeviceFlow owns the SIM path.
Step 5
Watch heartbeats (~15s), command polls (~3s), queue depth, and delivery in Live Monitor. Fix fleet issues before users feel them.
Dashboard ↔ API ↔ Android agent. The agent polls for work about every 3s and heartbeats about every 15s—no persistent device WebSocket required.
Dashboard ←JWT / WS→ Django API (+ Redis/Celery)
│
device token · poll ~3s · heartbeat ~15s
│
Android agent $ curl -X POST https://api.example/api/v1/messages/ \
-H "Authorization: Bearer pk_live_..." \
-H "Content-Type: application/json" \
-d '{
"to": "+15551234567",
"body": "Your code is 482915",
"mode": "otp"
}' Use cases
Whether you need auth OTP, order SMS, or carrier automation, DeviceFlow keeps the message path on hardware you operate.
Ship login and verification codes on real SIMs you control—no per-message SaaS lock-in for your critical auth path.
Order updates, shipping pings, and seller alerts from the same fleet that already handles OTP.
Page on-call or notify warehouse staff when queues spike, devices drop, or jobs fail—SMS that stays inside your infra.
Balance checks and carrier menus from the dashboard instead of walking every handset in the rack.
Run phones with local SIMs across regions. Route by operator and keep failover when one path degrades.
Keep numbers, logs, and routing under your roof. Open source under Apache 2.0 with clear attribution.
Product
Real-time device tiles, queue depth, and fleet health—operators see status the moment heartbeats and WebSocket events land.
Why DeviceFlow
A self-hosted alternative to pure SaaS SMS vendors—API-first, open source, and attribution-friendly under Apache 2.0.
Your phones, your Postgres, your Redis. Deploy on hardware you trust and keep message paths inside your boundary.
OTP and transactional SMS leave through physical SIMs—not a black-box SaaS number pool you cannot audit.
REST for send and ops, WebSockets for live UI, OpenAPI for discoverability. Build products on DeviceFlow, not around a click-only console.
Apache 2.0 plus a clear NOTICE: use it, fork it, ship it—credit the DeviceFlow GitHub repo.
Clone DeviceFlow, pair a phone, and send your first OTP. Open source under Apache 2.0—credit the GitHub repo when you ship.