@NFTCPS: 旧的安卓手机千万别扔! 不用买虚拟号,不用接第三方短信平台,httpSMS这玩意儿直接把你手里那台安卓机变成短信网关。 逻辑很糙但很实用: 你给它发个HTTP API请求 你的安卓手机就替你把短信发出去 手机收到的短信,还能转发到你自己的…
摘要
httpSMS 是一个开源工具,可以将旧安卓手机变成短信网关,通过HTTP API发送和接收短信,支持端到端加密和自部署,适合无法购买虚拟号码的地区作为替代方案。
查看缓存全文
缓存时间: 2026/07/01 06:03
旧的安卓手机千万别扔! 不用买虚拟号,不用接第三方短信平台,httpSMS这玩意儿直接把你手里那台安卓机变成短信网关。
逻辑很糙但很实用:
你给它发个HTTP API请求 你的安卓手机就替你把短信发出去 手机收到的短信,还能转发到你自己的webhook
最骚的是支持端到端加密AES-256,密钥只存你手机上,服务器都看不到内容。开源、能自部署,没号码可买的地区拿它当替代方案,真香。
https://github.com/NdoleStudio/httpsms…
NdoleStudio/httpsms
Source: https://github.com/NdoleStudio/httpsms
httpSMS
httpSMS is a service that lets you use your Android phone as an SMS Gateway to send and receive SMS messages. You make a request to a simple HTTP API and it triggers your Android phone to send an SMS. SMS messages received on your android phone can also be forwarded to your webhook endpoint.
Quick Start Guide 👉 https://docs.httpsms.com
Table Of Contents
- Why?
- Web UI
- API
- Android App
- Chat/forum
- Features
- API Clients
- Flows
- Self Host Setup - Docker
- Integration Testing
- License
Why?
I’m originally from Cameroon and I wanted an automated way to send and receive SMS messages using an API. Unfortunately many countries don’t support the ability to buy virtual phone numbers, and I could not find a good ready-made solution that could help me send/receive SMS messages using a mobile phone using an intuitive http API.
Web UI
The web interface https://httpsms.com is built using Nuxt and Vuetify. It is hosted as a single page application on firebase. The source code is in the web directory
API
The API https://api.httpsms.com is built using Fiber, Go and CockroachDB for the database. It rus as a serverless application on Google Cloud Run. The API documentation can be found here https://api.httpsms.com/index.html
// Sending an SMS Message using Go
client := htpsms.New(htpsms.WithAPIKey(/* API Key from https://httpsms.com/settings */))
client.Messages.Send(context.Background(), &httpsms.MessageSendParams{
Content: "This is a sample text message",
From: "+18005550199",
To: "+18005550100",
})
Android App
The Android App is a native application built using Kotlin with material design principles. This app must be installed on an Android phone before you can start sending and receiving SMS messages.
Chat/forum
There are a few ways to get in touch with me and/or the rest of the community. Feel free to use any of these methods. Whatever works best for you:
- Discord server - direct chat with the community
- GitHub issues - questions, features, bugs
Features
End-to-end Encryption
You can encrypt your messages end-to-end ysubg the military grade AES-256 encryption algorithm. Your encryption key is stored only on our mobile phone so the even the server won’t have any way to view the content of your SMS messages which are sent and received on your Android phone.
Webhook
If you want to build advanced integrations, we support webhooks. The httpSMS platform can forward SMS messages received on the android phone to your server using a callback URL which you provide.
Back Pressure
In-order not to abuse the SMS API on android, you can set a rate limit e.g 3 messages per minute. Such that even if you call the API to send messages to 100 people, It will only send the messages at a rate of 3 messages per minute.
Message Expiration
Sometimes it happens that the phone doesn’t get the push notification in time and I can’t send the SMS message. It is possible to set a timeout for which a message is valid and if a message becomes expired after the timeout elapses, you will be notified.
API Clients
- Go: https://github.com/NdoleStudio/httpsms-go
- JavaScript/TypeScript: https://github.com/NdoleStudio/httpsms-node
Flows
Sending an SMS Message
sequenceDiagram
User->>+httpSMS API: Call /v1/messages/send API
httpSMS API-->>+Push Queue: Schedule notification about new message
httpSMS API-->>-User: Respond with 202 (Accepted)
Push Queue-->>+httpSMS API: [Async] Send notification request
httpSMS API-->>-Android App: Send push notification about new message
Android App-->>httpSMS API: [Async] Fetch message
Android App-->>Android App: Send Message using Android SMS API
Android App-->>httpSMS API: [Async] Send result of sending SMS
Android App-->>httpSMS API: [Async] Send Delivery Report
Self Host Setup - Docker
1. Setup Firebase
- The httpSMS application uses firebase cloud messaging for sending push notifications to your Android phone to trigger an SMS message to be sent out.
Visit the firebase console and create a new project and follow the steps here to get your firebase web SDK config credentials.
For example, I created a firebase project called
httpsms-dockerand this is my web SDK configuration
const firebaseConfig = {
apiKey: "AIzaSyAKqPvj51igvvNNcRtxxxxx",
authDomain: "httpsms-docker.firebaseapp.com",
projectId: "httpsms-docker",
storageBucket: "httpsms-docker.appspot.com",
messagingSenderId: "668063041624",
appId: "1:668063041624:web:29b9e3b702796xxxx",
measurementId: "G-18VRYL2xxxx",
};
- Enable
Email/Passwordsign-in in the Firebase console, open the Authentication section. On the Sign in method tab, enable theEmail/passwordsign-in method and clickSave.- The firebase
email/passwordsign-in method has a bug which prevents you from signing in. The work around right now is to disable email enumeration protection on the firebase console.
- The firebase
- Generate your firebase service account credentials by following the steps here and save the credentials in a file called
firebase-credentials.jsonwe will use this file to authenticate with the firebase admin SDK. - Generate your Android
google-services.jsonfile using the instructions here we will use it letter to configure the android app.
2. Setup SMTP Email service
The httpSMS application uses SMTP to send emails to users e.g. when your Android phone has been offline for a long period of time. You can use a service like mailtrap to create an SMTP server for development purposes.
3. Setup Cloudflare Turnstile
The message search route (/v1/messages/search) is protected by a Cloudflare Turnstile captcha to prevent abuse. You need to set up a Turnstile widget for the search messages feature to work.
- Go to the Cloudflare dashboard and navigate to Turnstile.
- Add a new site and configure it for your self-hosted domain (e.g.,
localhostfor local development). - Note down the Site Key and Secret Key — you will need them for the frontend and backend environment variables respectively.
4. Download the code
Clone the httpSMS GitHub repository
git clone https://github.com/NdoleStudio/httpsms.git
5. Setup the environment variables
- Copy the
.env.dockerfile in thewebdirectory into.env
cp web/.env.docker web/.env
- Update the environment variables in the
.envfile in thewebdirectory with your firebase web SDK configuration in step 1 above
FIREBASE_API_KEY=
FIREBASE_AUTH_DOMAIN=
FIREBASE_PROJECT_ID=
FIREBASE_STORAGE_BUCKET=
FIREBASE_MESSAGING_SENDER_ID=
FIREBASE_APP_ID=
FIREBASE_MEASUREMENT_ID=
# Cloudflare Turnstile site key from step 3
CLOUDFLARE_TURNSTILE_SITE_KEY=
- Copy the
.env.dockerfile in theapidirectory into.env
cp api/.env.docker api/.env
- Update the environment variables in the
.envfile in theapidirectory with your firebase service account credentials, SMTP server details, and Cloudflare Turnstile secret key.
# SMTP email server settings
SMTP_USERNAME=
SMTP_PASSWORD=
SMTP_HOST=
SMTP_PORT=
# Firebase service account credentials
FIREBASE_CREDENTIALS=
# This is the `projectId` from your firebase web config
GCP_PROJECT_ID=
# Cloudflare Turnstile secret key from step 3
CLOUDFLARE_TURNSTILE_SECRET_KEY=
- Don’t bother about the
EVENTS_QUEUE_USER_API_KEYandEVENTS_QUEUE_USER_IDsettings. We will set that up later.
6. Build and Run
- Build and run the API, the web UI, database and cache using the
docker-compose.ymlfile. It takes a while for build and download all the docker images. When it’s finished, you’ll be able to access the web UI at http://localhost:3000 and the API at http://localhost:8000
docker compose up --build
7. Create the System User
-
The application uses the concept of a system user to process events async. You should manually create this user in
userstable in your database. Make sure you use the sameidandapi_keyas theEVENTS_QUEUE_USER_ID, andEVENTS_QUEUE_USER_API_KEYin your.envfile.INSERT INTO users (id, api_key, email ) VALUES ('your-system-user-id', 'your-system-api-key', '[email protected]');
Restart your API docker container after modifying
EVENTS_QUEUE_USER_ID, andEVENTS_QUEUE_USER_API_KEYin your.envfile so that the httpSMS API can pick up the changes.
8. Build the Android App.
- Before building the Android app in Android Studio, you need to replace the
google-services.jsonfile in theandroid/appdirectory with the file which you got from step 1. You need to do this for the firebase FCM messages to work properly.
Integration Testing
The project includes end-to-end integration tests that validate the complete SMS send/receive lifecycle. Tests run the full stack (API, PostgreSQL, Redis) in Docker alongside a phone emulator that simulates an Android device.
📖 Full documentation: tests/README.md
Quick run:
cd tests
bash generate-firebase-credentials.sh
export FIREBASE_CREDENTIALS=$(jq -c . firebase-credentials.json)
docker compose up -d --build --wait
docker compose wait seed && sleep 2
go test -v -timeout 120s ./...
docker compose down -v
Integration tests also run automatically in CI on every push/PR to main.
License
This project is licensed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3 - see the LICENSE file for details
相似文章
@hank_aibtc: 兄弟们,挖到个神级项目! 用闲置安卓手机直接变 SMS 网关,HTTP API 随便调用发收短信,再也不用给 Twilio 或短信平台交冤枉钱了! 项目叫 httpSMS,GitHub:NdoleStudio/httpsms 简单说就是装…
介绍开源项目 httpSMS,可将闲置安卓手机变为 SMS 网关,通过 HTTP API 收发短信,支持自托管 Docker 和端到端加密,省钱且稳定。
@CycleDecoded: 这玩意真有人做出来了!以后想给手机弹个通知,再也不用去折腾那些恶心的第三方服务和复杂的 API 了。 这是一个极简到骨子里的 HTTP 消息推送工具。不管是代码跑完了、脚本报错了、还是服务器挂了,直接一行命令,手机秒收到推送! binwi…
介绍 ntfy:一个极简的开源 HTTP 消息推送工具,通过一行 curl 命令即可向手机/桌面发送通知,支持全平台、免注册、自托管。
pppscn/SmsForwarder
SmsForwarder是一款Android短信转发工具,支持监控手机短信、来电和APP通知并按规则转发至钉钉、企业微信、邮箱等多种渠道,同时提供远程控制功能。
@katharine16289: 低成本获取美国手机号完整教程 很多朋友需要美国手机号来接收验证码或注册海外服务,今天分享一个成本极低的方法,核心使用Talkatone应用,搭配eSIM流量更稳定。全程建议用iPhone或iPad操作,兼容性最好。 第一步,下载并注册Ta…
教程介绍用Talkatone配合eSIM低成本获取美国手机号的方法,包括注册、保号、配置和使用步骤。
@wongmjane:我将使用了8年的手机复活成了一台Hermes Agent服务器——用postmarketOS(基于ARM64的Alpine Linux)替换了Android系统……
用户将一台用了8年的手机改造成Hermes Agent服务器,运行在ARM64的postmarketOS上,通过Matrix进行端到端加密聊天,减少了电子垃圾,也无需再购买Mac mini。

