← 返回
沟通协作 Key 中文

FreeSmsGateway

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...
通过Android(Termux)或专用设备运行本地sms-gate.app实例发送和接收短信。适用于需要发送短信的场景...
minstn
沟通协作 clawhub v1.0.0 1 版本 99816.2 Key: 需要
★ 0
Stars
📥 543
下载
💾 17
安装
1
版本
#latest

概述

SMS Gateway

Interact with a local sms-gate.app instance to send and receive SMS through an Android device.

Setup

Requires environment variables:

  • SMS_GATE_URL — Your gateway URL (e.g., http://192.168.50.69:8080)
  • SMS_GATE_USER — HTTP Basic Auth username
  • SMS_GATE_PASS — HTTP Basic Auth password

Quick Start

Send an SMS:

python3 scripts/send_sms.py '+41787008998' 'Hello from OpenClaw!'

Check delivery status:

python3 scripts/check_status.py 'VdHHQ3nlNwDZ-W9SNuLzm'

List recent messages:

python3 scripts/list_messages.py 20

Operations

Sending SMS

Use scripts/send_sms.py:

python3 scripts/send_sms.py '<phone_number>' '<message>' [delivery_report]

Phone numbers can include + prefix (will be normalized). Delivery report is true by default.

Checking Status

Use scripts/check_status.py with the message ID returned from send:

python3 scripts/check_status.py '<message_id>'

States: PendingSentDelivered (or Failed)

Listing Messages

Use scripts/list_messages.py:

python3 scripts/list_messages.py [limit]

Shows both sent (📤) and received (📥) messages with their current state.

Managing Webhooks

Use scripts/manage_webhooks.py:

# List configured webhooks
python3 scripts/manage_webhooks.py list

# Add webhook for incoming SMS
python3 scripts/manage_webhooks.py add sms:received https://your-server.com/sms

# Add delivery confirmation webhook
python3 scripts/manage_webhooks.py add sms:delivered https://your-server.com/delivered

# Delete webhook
python3 scripts/manage_webhooks.py delete sms:received

API Reference

See references/api.md for complete endpoint documentation.

Common Patterns

Send with status check:

# Send and capture ID
MSG_ID=$(python3 scripts/send_sms.py '+41787008998' 'Test' 2>&1 | grep "ID:" | awk '{print $3}')

# Check status after a few seconds
sleep 5
python3 scripts/check_status.py "$MSG_ID"

Health check:

python3 scripts/health.py

Receiving SMS (Incoming)

The sms-gate.app API doesn't store message content - it only delivers via webhooks. To receive incoming SMS:

Option 1: Webhook Server + ngrok (Recommended)

1. Start the webhook receiver:

python3 scripts/webhook_server.py 8787

2. Expose via ngrok:

ngrok http 8787
# Copy the https://xxxx.ngrok-free.app URL

3. Configure webhook:

python3 scripts/manage_webhooks.py add sms:received https://xxxx.ngrok-free.app/sms-received

Now incoming SMS will be printed to the webhook server console.

Option 2: Local Network (Same WiFi)

If Pixel 3 and Mac are on same network:

# Get Mac IP
ipconfig getifaddr en0
# Configure webhook directly (if gateway allows HTTP)
python3 scripts/manage_webhooks.py add sms:received http://<mac-ip>:8787/sms-received

Notes

  • The Android device must have SMS capability and be on the same network (or accessible via tunnel like Cloudflare)
  • Webhooks require HTTPS for remote access (ngrok provides this)
  • Message content is only available via webhooks, not stored in /messages API
  • Message IDs are URL-safe strings returned after sending

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 20:43 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

communication-collaboration

Himalaya

lamelas
{"answer":"通过IMAP/SMTP管理邮件的CLI。可在终端使用 `himalaya` 收发、回复、转发、搜索及整理邮件。支持多账户与MML(MIME元语言)编写邮件。"}
★ 68 📥 45,585
developer-tools

UseMemos

minstn
与 UseMemos 实例交互——轻量级、自托管的备忘录中心。创建、搜索、列出备忘录并上传附件。
★ 0 📥 1,488
communication-collaboration

imap-smtp-email

gzlicanyi
使用IMAP/SMTP读取和发送邮件;检查新/未读邮件、获取内容、搜索邮箱、标记已读/未读、发送带附件的邮件。支持...
★ 114 📥 52,411