About this project
httpSMS is a service that lets you use an Android phone as an SMS gateway. You call a simple HTTP API, and the request triggers the Android phone to send an SMS. Messages received on the phone can be forwarded to a webhook endpoint you provide. The project was created because virtual phone numbers are unavailable in many countries, and the author wanted an automated, API-driven way to send and receive SMS through a real mobile phone.
Components
- Web UI: a single-page application built with Nuxt and Vuetify, hosted on Firebase; source lives in the web directory.
- API: built with Go and Fiber, using CockroachDB, and designed to run serverless on Google Cloud Run. API documentation is published separately.
- Android app: a native Kotlin application that must be installed on the phone before messages can be sent or received. It is distributed as an APK and via GitHub releases.
Features
- End-to-end encryption: messages can be encrypted with AES-256, with the key stored only on the phone, so the server cannot read message contents.
- Webhooks: received SMS messages can be forwarded to a callback URL for building integrations.
- Back pressure: a configurable rate limit (for example, three messages per minute) prevents flooding the phone's SMS API even when many recipients are queued.
- Message expiration: a timeout can be set for message validity, and you are notified if a message expires before being sent.
API clients
Official client libraries are listed for Go and JavaScript/TypeScript.
Sending flow
A request to the send endpoint is accepted with HTTP 202, a push notification is scheduled and delivered to the Android app, the app fetches the message, sends it through the Android SMS API, and reports the send result and delivery report back to the API asynchronously.
Self-hosting with Docker
The README documents a Docker-based self-host path: create a Firebase project and web SDK config, enable email/password sign-in (with a noted workaround for email enumeration protection), generate Firebase service account credentials and an Android google-services.json, configure an SMTP email service, set up a Cloudflare Turnstile widget to protect the message search route, clone the repository, copy the provided .env.docker files for web and api, fill in the environment variables, then run docker compose up --build. The web UI is then reachable on port 3000 and the API on port 8000. A system user must be inserted into the users table with an id and api_key matching the events queue settings, and the API container restarted afterward. The Android app must be built in Android Studio with the replaced google-services.json for push messaging to work.
Testing and license
End-to-end integration tests run the full stack (API, PostgreSQL, Redis) in Docker with a phone emulator simulating an Android device, and also run in CI on pushes and pull requests to main. The project is licensed under the GNU Affero General Public License v3.
Comments
0 people shared their preference · Deer Point appears after 10 participants
Sign in to join the discussion.