返回顶部
l

line-openapi-skillLINE开放API技能

Operate LINE Messaging API through UXC with a curated OpenAPI schema, bearer-token auth, and messaging-core guardrails.

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

line-openapi-skill

LINE Messaging API 技能

使用此技能通过 uxc + OpenAPI 运行 LINE Messaging API 操作。

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

前提条件

  • - uxc 已安装并可在 PATH 中使用。
  • 可访问 https://api.line.me 的网络连接。
  • 可访问精选的 OpenAPI 模式 URL:
- https://raw.githubusercontent.com/holon-run/uxc/main/skills/line-openapi-skill/references/line-messaging.openapi.json
  • - 一个 LINE Messaging API 频道访问令牌。

范围

此技能涵盖消息核心功能:

  • - 机器人身份查询
  • 用户资料查询
  • 推送和回复消息发送
  • 配额和配额消耗读取
  • Webhook 端点获取/设置/测试操作

此技能涵盖:

  • - 入站 Webhook 接收器运行时
  • api-data.line.me 上的媒体/内容下载流程
  • 受众、窄播、富菜单或账户管理功能
  • 完整的 LINE Messaging API

认证

LINE Messaging API 使用 Authorization: Bearer <频道访问令牌>。

配置一个 Bearer 凭据并将其绑定到 api.line.me:

bash
uxc auth credential set line-channel \
--auth-type bearer \
--secret-env LINECHANNELACCESS_TOKEN

uxc auth binding add \
--id line-channel \
--host api.line.me \
--scheme https \
--credential line-channel \
--priority 100

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

bash
uxc auth binding match https://api.line.me

核心工作流程

  1. 1. 默认使用固定链接命令:
- command -v line-openapi-cli - 如果缺失,创建它: uxc link line-openapi-cli https://api.line.me --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/line-openapi-skill/references/line-messaging.openapi.json - line-openapi-cli -h
  1. 2. 首先检查操作模式:
- line-openapi-cli get:/v2/bot/info -h - line-openapi-cli get:/v2/bot/profile/{userId} -h - line-openapi-cli post:/v2/bot/message/push -h
  1. 3. 在写入操作前优先进行读取/设置验证:
- line-openapi-cli get:/v2/bot/info - line-openapi-cli get:/v2/bot/message/quota - line-openapi-cli get:/v2/bot/channel/webhook/endpoint
  1. 4. 使用键/值或位置 JSON 执行:
- 键/值: line-openapi-cli get:/v2/bot/profile/{userId} userId=U1234567890abcdef - 位置 JSON: line-openapi-cli post:/v2/bot/message/push {to:U1234567890abcdef,messages:[{type:text,text:来自 UXC 的问候}]}

操作组

读取/查询

  • - get:/v2/bot/info
  • get:/v2/bot/profile/{userId}
  • get:/v2/bot/message/quota
  • get:/v2/bot/message/quota/consumption
  • get:/v2/bot/channel/webhook/endpoint

消息发送

  • - post:/v2/bot/message/push
  • post:/v2/bot/message/reply

Webhook 端点管理

  • - put:/v2/bot/channel/webhook/endpoint
  • post:/v2/bot/channel/webhook/test

安全护栏

  • - 保持自动化在 JSON 输出信封上;不要使用 --text。
  • 首先解析稳定字段:ok、kind、protocol、data、error。
  • 使用具有目标机器人/频道配置所需作用域的频道访问令牌。
  • post:/v2/bot/message/push 和 post:/v2/bot/message/reply 是写入/高风险操作;执行前需要明确的用户确认。
  • replyToken 值生命周期短且源自 Webhook。仅在调用者已拥有来自最近事件的有效令牌时使用 post:/v2/bot/message/reply。
  • Webhook 端点获取/设置/测试调用仅配置投递;它们不在 uxc 中提供接收器运行时。
  • 此 v1 技能保持在 https://api.line.me 上;https://api-data.line.me 上的内容检索端点有意不在范围内。
  • line-openapi-cli <操作> ... 等同于 uxc https://api.line.me --schema-url openapischema> <操作> ...。

参考资料

  • - 使用模式:references/usage-patterns.md
  • 精选 OpenAPI 模式:references/line-messaging.openapi.json
  • LINE Messaging API 参考:https://developers.line.biz/en/reference/messaging-api/

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 line-openapi-skill-1776354076 技能

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

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

通过命令行安装

skillhub install line-openapi-skill-1776354076

下载

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

文件大小: 6.25 KB | 发布时间: 2026-4-17 15:13

v1.0.0 最新 2026-4-17 15:13
- Initial release of the line-openapi-skill (v1.0.0).
- Enables LINE Messaging API operations via uxc and curated OpenAPI schema.
- Supports bot and user profile lookup, message send, quota reads, and webhook endpoint management.
- Requires bearer-token authentication and uxc credential binding to api.line.me.
- Includes strict guardrails around high-risk message operations and JSON output parsing.
- Excludes webhook receiver runtime, media downloads, and non-messaging-core API surfaces.

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

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

p2p_official_large
返回顶部