返回顶部
w

whatsapp-openapi-skillWhatsApp开放API技能

Operate WhatsApp Business Platform Cloud API through UXC with a curated OpenAPI schema, bearer-token auth, and message/profile guardrails.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
178
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

whatsapp-openapi-skill

WhatsApp Cloud API 技能

使用此技能通过 uxc + OpenAPI 运行 WhatsApp Business Platform Cloud API 操作。

复用 uxc 技能以获取共享执行、身份验证和错误处理指导。

前提条件

  • - uxc 已安装并可在 PATH 中使用。
  • 可访问 https://graph.facebook.com/v25.0 网络。
  • 可访问精选的 OpenAPI 模式 URL:
- https://raw.githubusercontent.com/holon-run/uxc/main/skills/whatsapp-openapi-skill/references/whatsapp-cloud.openapi.json
  • - 拥有一个具有 Cloud API 访问权限的 Meta 应用和 WhatsApp Business 账户。
  • 拥有一个有效的系统用户或应用访问令牌,可调用目标 WhatsApp 资产。
  • 至少有一个 phonenumberid,对于电话号码列表,还需要相关的 waba_id。

范围

此技能涵盖紧凑的 Cloud API 请求/响应接口:

  • - 电话号码列表
  • 电话号码元数据读取
  • 商业资料读取和更新
  • 出站消息发送

此技能涵盖:

  • - 入站 Webhook 接收器运行时
  • 模板生命周期管理
  • 嵌入式注册或更广泛的业务入驻流程
  • 媒体上传/下载生命周期
  • 完整的 WhatsApp Business Platform 接口

API 版本

此技能固定使用 Graph API v25.0,基于实现时当前的 Meta 开发者示例。请保持基础 URL 带版本号:

  • - https://graph.facebook.com/v25.0

如果 Meta 后续弃用此版本,应在后续更新中修订封装器,而不是假设无版本兼容性。

身份验证

WhatsApp Cloud API 使用 Authorization: Bearer

配置一个 Bearer 凭证并将其绑定到带版本的 Graph API 基础路径:

bash
uxc auth credential set whatsapp-cloud \
--auth-type bearer \
--secret-env WHATSAPPCLOUDACCESS_TOKEN

uxc auth binding add \
--id whatsapp-cloud \
--host graph.facebook.com \
--path-prefix /v25.0 \
--scheme https \
--credential whatsapp-cloud \
--priority 100

当身份验证出现问题时,验证活动映射:

bash
uxc auth binding match https://graph.facebook.com/v25.0

核心工作流程

  1. 1. 默认使用固定链接命令:
- command -v whatsapp-openapi-cli - 如果缺失,创建它: uxc link whatsapp-openapi-cli https://graph.facebook.com/v25.0 --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/whatsapp-openapi-skill/references/whatsapp-cloud.openapi.json - whatsapp-openapi-cli -h
  1. 2. 首先检查操作模式:
- whatsapp-openapi-cli get:/{wabaid}/phonenumbers -h - whatsapp-openapi-cli get:/{phonenumberid}/whatsappbusinessprofile -h - whatsapp-openapi-cli post:/{phonenumberid}/messages -h
  1. 3. 在写入前优先进行读取/设置验证:
- whatsapp-openapi-cli get:/{wabaid}/phonenumbers waba_id=123456789012345 - whatsapp-openapi-cli get:/{phonenumberid} phonenumberid=123456789012345 - whatsapp-openapi-cli get:/{phonenumberid}/whatsappbusinessprofile phonenumberid=123456789012345
  1. 4. 使用键/值或位置 JSON 执行:
- 键/值: whatsapp-openapi-cli get:/{phonenumberid} phonenumberid=123456789012345 fields=displayphonenumber,verified_name - 位置 JSON: whatsapp-openapi-cli post:/{phonenumberid}/messages {phonenumberid:123456789012345,messaging_product:whatsapp,to:15551234567,type:text,text:{body:Hello from UXC}}

操作组

资产发现

  • - get:/{wabaid}/phonenumbers
  • get:/{phonenumberid}

商业资料

  • - get:/{phonenumberid}/whatsappbusinessprofile
  • post:/{phonenumberid}/whatsappbusinessprofile

消息发送

  • - post:/{phonenumberid}/messages

防护措施

  • - 保持自动化在 JSON 输出信封上;不要使用 --text。
  • 首先解析稳定字段:ok、kind、protocol、data、error。
  • post:/{phonenumberid}/messages 是高风险的写入操作。执行前需要明确的用户确认。
  • 消息投递仍受 WhatsApp 对话规则、模板审批规则、收件人选择加入期望和账户政策状态的约束。身份验证成功并不意味着允许发送。
  • 此 v1 技能不管理媒体上传。如果发送 image 或 document 内容,请使用平台允许的已托管 URL 或现有资产引用。
  • Webhook 订阅和验证仅作为文档记录。此技能不配置接收器运行时。
  • 商业资料更新字段是部分的。只发送您打算更改的字段。
  • whatsapp-openapi-cli ... 等同于 uxc https://graph.facebook.com/v25.0 --schema-url openapischema> ...。

参考

  • - 使用模式:references/usage-patterns.md
  • 精选的 OpenAPI 模式:references/whatsapp-cloud.openapi.json
  • WhatsApp Cloud API 文档:https://developers.facebook.com/docs/whatsapp/cloud-api
  • Graph API 访问令牌:https://developers.facebook.com/docs/graph-api/overview/access-tokens/

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 whatsapp-openapi-skill-1776353884 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 whatsapp-openapi-skill-1776353884 技能

通过命令行安装

skillhub install whatsapp-openapi-skill-1776353884

下载

⬇ 下载 whatsapp-openapi-skill v1.0.0(免费)

文件大小: 7.66 KB | 发布时间: 2026-4-17 16:34

v1.0.0 最新 2026-4-17 16:34
Initial release of the WhatsApp Business Platform Cloud API skill.

- Enables WhatsApp API operations (phone number info, business profile, messaging) via UXC and curated OpenAPI schema.
- Supports bearer-token authentication and version-pinned API paths (Graph API v25.0).
- Documents required setup, core usage workflow, and best-practice guardrails.
- Focuses on outbound requests: does not cover inbound webhooks, template management, media lifecycle, or full platform surface.
- Includes references and strict guidance on safe message sending and business profile changes.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部