返回顶部
e

engagelab-webpush EngageLab网页推送

>

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

engagelab-webpush

技能名称: engagelab-webpush
详细描述:

EngageLab Web Push API 技能

该技能支持与 EngageLab Web Push REST API(MTPush Web)进行交互。该服务仅支持向 Web 平台发送推送通知和应用内消息,支持 EngageLab 通道和系统通道(Chrome、Firefox、Safari、Edge、Opera)。

涵盖以下领域:

  1. 1. 创建推送 — 向单个或多个 Web 设备发送通知或消息(广播、标签、别名、registrationid)
  2. 批量单推 — 按 registrationid 或别名进行批量推送(每次请求最多 500 条)
  3. 群组推送 — 向群组中的所有应用推送
  4. 定时任务 — 创建、获取、更新、删除 Web 推送定时任务(单次、周期性、智能)
  5. 标签与别名 — 查询/设置/删除设备标签和别名;查询标签数量
  6. 删除用户 — 删除用户(registration_id)及其所有关联数据
  7. 统计 — 消息生命周期统计(目标数、发送数、送达数、展示数、按渠道点击数)
  8. 回调 — Webhook 设置与签名验证

资源

scripts/

  • - webpush_client.py — Python 客户端类(EngageLabWebPush),封装了创建推送、批量推送(regid/别名)、设备获取/设置/删除、标签数量、定时任务 CRUD 以及消息详情。处理基本认证和类型化错误处理。

references/

  • - error-codes.md — Web Push API 错误码及描述
  • http-status-code.md — HTTP 状态码规范
  • callback-api.md — 回调地址、验证、安全性(X-CALLBACK-ID、HMAC-SHA256)

源 API 文档:doc/webpush/REST API/(REST API 概述、创建推送 API、批量单推 API、群组推送 API、定时任务 API、标签别名 API、删除用户 API、统计 API、回调 API、HTTP 状态码)。

认证

所有 EngageLab Web Push API 调用均使用 HTTP 基本认证

  • - 基础 URL(按数据中心选择):
- 新加坡:https://webpushapi-sgp.engagelab.com - 香港:https://webpushapi-hk.engagelab.com
  • - 请求头:Authorization: Basic base64(appKey:masterSecret)
  • 内容类型:application/json

从控制台 → 应用设置 → 应用信息中获取 AppKeyMaster Secret

群组推送使用不同的认证:username = group- + GroupKey,password = 群组主密钥(来自群组管理)。

示例(curl):

bash
curl -X POST https://webpushapi-sgp.engagelab.com/v4/push \
-H Content-Type: application/json \
-u YOURAPPKEY:YOURMASTERSECRET \
-d { from: push, to: all, body: { platform: web, notification: { web: { alert: Hello!, title: Web Push, url: https://example.com } } } }

如果用户未提供凭证,请在生成 API 调用前询问 AppKeyMaster Secret

请求速率限制

  • - 标准:每个 AppKey 每秒 500 次请求。
  • 批量单推与推送 API 共享相同的 QPS 配额(1 个目标 = 1 QPS)。

快速参考 — 主要端点

| 操作 | 方法 | 路径 |
|-----------|--------|------|
| 创建推送 | POST | /v4/push |
| 按 registration_id 批量推送 | POST | /v4/batch/push/regid |
| 按别名批量推送 | POST | /v4/batch/push/alias |
| 群组推送 | POST | /v4/grouppush |
| 创建定时任务 | POST | /v4/schedules |
| 获取定时任务 | GET | /v4/schedules/{schedule_id} |
| 更新定时任务 | PUT | /v4/schedules/{schedule_id} |
| 删除定时任务 | DELETE | /v4/schedules/{schedule_id} |
| 标签数量 | GET | /v4/tags_count |
| 获取设备(标签/别名) | GET | /v4/devices/{registration_id} |
| 设置设备标签/别名 | POST | /v4/devices/{registration_id} |
| 删除设备(用户) | DELETE | /v4/devices/{registration_id} |
| 消息统计 | GET | /v4/messages/details(message_ids) |

创建推送(POST /v4/push)

向 Web 设备推送通知或消息。平台仅限 web

请求结构(概要)

| 字段 | 类型 | 必填 | 描述 |
|-------|------|----------|-------------|
| from | 字符串 | 否 | 发送者,例如 push |
| to | 字符串或对象 | 是 | 目标:all(广播,30 天内活跃的设备),或包含 tag、tagand、tagnot、alias、registration_id 的对象 |
| body | 对象 | 是 | 见下文 |
| request_id | 字符串 | 否 | 客户端定义的请求 ID,在响应中返回 |
| custom_args | 对象 | 否 | 回调时返回 |

body

| 字段 | 类型 | 必填 | 描述 |
|-------|------|----------|-------------|
| platform | 字符串 | 是 | 必须为 web |
| notification | 对象 | 可选* | 通知内容(web:alert、title、url、icon、image、extras) |
| message | 对象 | 可选* | 应用内/自定义消息(msgcontent、title、contenttype、extras) |
| options | 对象 | 否 | timetolive、overridemsgid、bigpushduration、webbuttons、multilanguage、thirdpartychannel(w3push.distribution)、plan_id、cid |

*notification 和 message 必须存在其一,不能同时存在。

notification.web

| 字段 | 类型 | 必填 | 描述 |
|-------|------|----------|-------------|
| alert | 字符串 | 是 | 消息内容 |
| url | 字符串 | 是 | 点击跳转 URL |
| title | 字符串 | 否 | 消息标题 |
| icon | 字符串 | 否 | 通知图标(建议 192×192px;≤1MB;JPG/PNG/GIF;Chrome、Firefox) |
| image | 字符串 | 否 | 大图(建议 360×180px;≤1MB;Chrome、Edge) |
| extras | 对象 | 否 | 自定义键值对,用于业务 |

options(要点)

  • - timetolive:离线保留时间(秒,默认 86400,最长 15 天);0 表示仅在线。
  • overridemsgid:覆盖之前的消息(有效期为 1 天)。
  • bigpushduration:在 n 分钟内限速推送(最长 1440 分钟);一次最多 20 个限速推送。
  • webbuttons:最多 2 个按钮的数组(id、text、icon、url);Chrome 48+。
  • multilanguage:按语言的内容/标题(例如 en、zh-Hans)。
  • thirdpartychannel.w3push.distribution:firstospush | mtpush | secondarypush | ospush,用于系统通道优先级。
  • plan_idcid:推送计划 ID 和去重 ID(最长 64 字符,每个 AppKey 唯一)。

推送目标 to 示例

  • - 广播:to: all
  • 标签(OR):to: { tag: [tag1,tag2] }
  • 标签(AND):to: { tag_and: [tag3,tag4] }

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 engagelab-web-push-1776157563 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 engagelab-web-push-1776157563 技能

通过命令行安装

skillhub install engagelab-web-push-1776157563

下载

⬇ 下载 engagelab-webpush v1.0.1(免费)

文件大小: 10.94 KB | 发布时间: 2026-4-15 11:55

v1.0.1 最新 2026-4-15 11:55
engagelab-web-push 1.0.1

- No file changes detected in this release.
- Functionality, documentation, and behavior remain unchanged from the previous version.

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

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

p2p_official_large
返回顶部