闲社服务运行正常AI智能体自动化平台
s

短信网关

技能标识:sms-gateway

Send and receive SMS using a local sms-gate.app instance running on Android (via Termux) or a dedicated device. Use when the user needs to send text messages, check delivery status, list message history, or manage webhooks for incoming SMS.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

短信网关

SMS 网关

通过本地 sms-gate.app 实例与 Android 设备交互,实现短信的发送与接收。

环境配置

需要设置以下环境变量:

  • - SMSGATEURL — 网关地址(例如:http://192.168.50.69:8080)
  • SMSGATEUSER — HTTP 基本认证用户名
  • SMSGATEPASS — HTTP 基本认证密码

快速上手

发送短信:
bash
python3 scripts/send_sms.py +41787008998 来自 OpenClaw 的问候!

查询投递状态:
bash
python3 scripts/check_status.py VdHHQ3nlNwDZ-W9SNuLzm

查看最近消息:
bash
python3 scripts/list_messages.py 20

操作指南

发送短信

使用 scripts/send_sms.py:
bash
python3 scripts/send_sms.py <电话号码> <消息内容> [投递报告]

电话号码可包含 + 前缀(系统会自动规范化)。投递报告默认值为 true。

查询状态

使用 scripts/check_status.py,传入发送时返回的消息 ID:
bash
python3 scripts/check_status.py <消息ID>

状态流转:待发送 → 已发送 → 已送达(或 发送失败)

查看消息列表

使用 scripts/list_messages.py:
bash
python3 scripts/list_messages.py [数量限制]

显示已发送(📤)和已接收(📥)的消息及其当前状态。

管理 Webhook

使用 scripts/manage_webhooks.py:

bash

查看已配置的 webhook


python3 scripts/manage_webhooks.py list

添加入站短信 webhook

python3 scripts/manage_webhooks.py add sms:received https://your-server.com/sms

添加投递确认 webhook

python3 scripts/manage_webhooks.py add sms:delivered https://your-server.com/delivered

删除 webhook

python3 scripts/manage_webhooks.py delete sms:received

API 参考文档

完整接口文档请参阅 references/api.md。

常见模式

发送并查询状态:
bash

发送并获取消息 ID


MSGID=$(python3 scripts/sendsms.py +41787008998 测试 2>&1 | grep ID: | awk {print $3})

等待几秒后查询状态

sleep 5 python3 scripts/checkstatus.py $MSGID

健康检查:
bash
python3 scripts/health.py

接收短信(入站)

sms-gate.app API 不存储消息内容,仅通过 webhook 进行投递。接收入站短信的方法如下:

方案一:Webhook 服务器 + ngrok(推荐)

1. 启动 webhook 接收器:
bash
python3 scripts/webhook_server.py 8787

2. 通过 ngrok 暴露服务:
bash
ngrok http 8787

复制 https://xxxx.ngrok-free.app 地址

3. 配置 webhook:
bash
python3 scripts/manage_webhooks.py add sms:received https://xxxx.ngrok-free.app/sms-received

现在,入站短信将显示在 webhook 服务器控制台中。

方案二:本地网络(同一 WiFi)

如果 Pixel 3 和 Mac 处于同一网络:
bash

获取 Mac IP 地址


ipconfig getifaddr en0

直接配置 webhook(如果网关允许 HTTP)


python3 scripts/manage_webhooks.py add sms:received http://:8787/sms-received

注意事项

  • - Android 设备需具备短信功能,并与网关处于同一网络(或可通过 Cloudflare 等隧道访问)
  • Webhook 需要 HTTPS 进行远程访问(ngrok 可提供此功能)
  • 消息内容仅通过 webhook 获取,不会存储在 /messages API 中
  • 消息 ID 是发送后返回的 URL 安全字符串

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 sms-gateway-1776086891 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 sms-gateway-1776086891 技能

通过命令行安装

skillhub install sms-gateway-1776086891

下载

⬇ 下载 sms-gateway v1.0.0(免费)

文件大小: 14.16 KB | 发布时间: 2026-4-15 14:27

v1.0.0 最新 2026-4-15 14:27
Initial release of sms-gateway skill:

- Send and receive SMS via a local sms-gate.app instance on Android phone like Google Pixel 3
- Scripts provided for sending SMS, checking delivery status, listing message history, and managing webhooks for incoming SMS and delivery confirmations.
- Requires environment variables for gateway URL, user, and password.
- Detailed setup instructions and common usage patterns included.
- Supports webhook integration for receiving incoming SMS, with guidance for both local and remote setups (e.g., ngrok).
返回顶部