← 返回
沟通协作 Key 中文

Send Usms Uspeedo

Sends international SMS (USMS) via uspeedo platform HTTP API. Use when the user needs to send international SMS, batch SMS, verification/notification/marketi...
通过 uspeedo 平台的 HTTP API 发送国际短信 (USMS)。适用于发送国际短信、批量短信、验证码/通知/营销等场景。
code-by-ai
沟通协作 clawhub v1.0.3 2 版本 100000 Key: 需要
★ 0
Stars
📥 604
下载
💾 9
安装
2
版本
#latest

概述

Send International SMS via uspeedo

Skill Overview

This skill sends international SMS (USMS) through the uspeedo HTTP API, supporting verification codes, notifications, and marketing. After configuring environment variables, you can send in batch and fill content by template. See the uspeedo console for API docs and account management.

Environment Variables

Configure before use (read from environment or .env):

VariableRequiredDescription
---------------------------------
USPEEDO_ACCESSKEY_IDYesAccessKey ID (create in console)
USPEEDO_ACCESSKEY_SECRETYesAccessKey Secret (create in console)
USPEEDO_ACCOUNT_IDNoAccount ID (optional), see docs
USPEEDO_TEMPLATE_ID_VERIFICATIONAs neededVerification template ID
USPEEDO_TEMPLATE_ID_NOTIFICATIONAs neededNotification template ID
USPEEDO_TEMPLATE_ID_MARKETINGAs neededMarketing template ID
USPEEDO_SENDER_IDNoSender ID; use empty string if none

Configure the template ID for each SMS type you use. All template IDs in this skill are full-variable templates; TemplateParams is the actual full SMS body (usually a single-element array, e.g. ["Your verification code is 123456, valid for 5 minutes."]).

Pre-checks and User Guidance

Before sending, check environment variables. When not configured, guide the user as follows:

1. When USPEEDO_ACCESSKEY_ID or USPEEDO_ACCESSKEY_SECRET is not set, or there is no .env / no environment variables

Tell the user to follow these steps directly. After giving this guidance, stop—do not perform sending or any further steps:

  1. Open the uspeedo console to register and log in.
  2. In the console, create an AccessKey and save the ACCESSKEY_ID and ACCESSKEY_SECRET.
  3. Open SMS template management, create a full-variable template: choose purpose “Verification” or “Notification/Marketing” (according to the type you want to send), set template content to {1}, submit and wait for approval.
  4. After approval, copy the template ID from the template list. It is recommended to create one template per type (verification, notification, marketing) and set USPEEDO_TEMPLATE_ID_VERIFICATION, USPEEDO_TEMPLATE_ID_NOTIFICATION, USPEEDO_TEMPLATE_ID_MARKETING accordingly.
  5. Write ACCESSKEY_ID, ACCESSKEY_SECRET, and template IDs into .env or environment variables, then retry sending.

2. When AccessKey is set but the template ID for the SMS type being sent is not configured

(e.g. sending verification SMS but USPEEDO_TEMPLATE_ID_VERIFICATION is not set)

Tell the user: You are sending [verification/notification/marketing] SMS but the corresponding template ID is not configured. Go to SMS template management, create a full-variable template for that type (template content {1}), and after approval set the template ID in USPEEDO_TEMPLATE_ID_VERIFICATION / USPEEDO_TEMPLATE_ID_NOTIFICATION / USPEEDO_TEMPLATE_ID_MARKETING.

Request

  • URL: POST https://api.uspeedo.com/api/v1/usms/SendBatchUSMSMessage
  • Content-Type: application/json
  • Auth: Header Authorization: Basic base64(ACCESSKEY_ID:ACCESSKEY_SECRET). Base64-encode USPEEDO_ACCESSKEY_ID:USPEEDO_ACCESSKEY_SECRET and set the header to Basic .

Request Body

Send only the TaskContent array. Each item has:

  • TemplateId: Template ID for that type
  • SenderId: Set if you have one, otherwise ""
  • Target: Array of:
  • Phone: Number, e.g. 13800138000 or international format (852)55311111
  • TemplateParams: String array. For full-variable templates this is the full SMS content to send, usually one element (e.g. ["Your verification code is 123456, valid for 5 minutes."])

Examples

Request body (single verification):

{
  "TaskContent": [
    {
      "TemplateId": "template_id_1",
      "SenderId": "USpeedo",
      "Target": [
        {
          "Phone": "13800138000",
          "TemplateParams": ["Your verification code is 123456"]
        }
      ]
    }
  ]
}

curl:

curl -X POST "https://api.uspeedo.com/api/v1/usms/SendBatchUSMSMessage" \
  -H "Content-Type: application/json" \
  -H "Authorization: Basic $(echo -n 'YOUR_ACCESSKEY_ID:YOUR_ACCESSKEY_SECRET' | base64)" \
  -d '{
    "TaskContent": [
      {
        "TemplateId": "template_id_1",
        "SenderId": "USpeedo",
        "Target": [
          {
            "Phone": "13800138000",
            "TemplateParams": ["Your verification code is 123456"]
          }
        ]
      }
    ]
  }'

Workflow

  1. Pre-check: If USPEEDO_ACCESSKEY_ID or USPEEDO_ACCESSKEY_SECRET is not set, or there is no .env / no environment variables, follow “Pre-checks and User Guidance” item 1 and stop. If the user is sending a type that has no template ID configured (e.g. verification but USPEEDO_TEMPLATE_ID_VERIFICATION not set), follow item 2.
  2. Confirm SMS type (verification / notification / marketing) and choose the corresponding template ID env var.
  3. Read USPEEDO_ACCESSKEY_ID, USPEEDO_ACCESSKEY_SECRET, the chosen template ID, and optional USPEEDO_SENDER_ID from env. Set header Authorization: Basic base64(ACCESSKEY_ID:ACCESSKEY_SECRET) and POST to https://api.uspeedo.com/api/v1/usms/SendBatchUSMSMessage.
  4. Build TemplateParams (for full-variable template, the full SMS content). Format phone in international form (with country/region code) if needed.
  5. Send the POST, parse RetCode and Message, and report success or failure. On error codes, see “Common errors” below.

Common Errors

  • {"Message":"Failed to parse token","RetCode":215398}

AccessKey (ACCESSKEY_ID / ACCESSKEY_SECRET) is invalid or expired. Tell the user: AccessKey is invalid. Please sign in at the uspeedo console and update ACCESSKEY_ID and ACCESSKEY_SECRET.

Notes

  • Do not write any script to send SMS; use the reference curl command in this document.
  • Do not hardcode ACCESSKEY_ID or ACCESSKEY_SECRET in code or config; read from environment.
  • Phone should be in international format (with country/region code), e.g. (852)55311111.
  • If you have no SenderId, use empty string ""; do not omit the field or the API may error.

版本历史

共 2 个版本

  • v1.0.3 当前
    2026-03-29 22:44 安全 安全
  • v1.0.0
    2026-03-19 23:13

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

communication-collaboration

Gmail

byungkyu
Gmail API 集成,托管 OAuth,支持读取、发送和管理邮件、线程、标签及草稿,适用于需要与 Gmail 交互的场景。
★ 72 📥 37,731
communication-collaboration

Slack

steipete
当需要通过 slack 工具从 Clawdbot 控制 Slack 时使用,包括在频道或私信中回复消息或置顶/取消置顶项目。
★ 157 📥 47,680
communication-collaboration

Himalaya

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