返回顶部
s

skool-all-in-one-apiSkool全功能API

Full read AND write access to Skool communities. Use when user asks to manage Skool members (approve, reject, list pending), read or create posts, reply to comments, mention users, or automate community management. The only Skool tool with write capabilities.

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

skool-all-in-one-api

Skool 全合一 API

通过 Apify 对 Skool 社区进行完整的读写访问。

前置条件

  • - 包含 APIFY_TOKEN 的 .env 文件
  • Node.js 20.6+
  • mcpc CLI 工具

关键:Skool 数据模型

在 Skool 中,帖子和评论是同一个对象。

  • - 读取评论:使用 posts:getComments — 而不是 comments:list
  • 创建评论:使用 posts:createComment — 而不是 comments:create
  • 没有 comments: 命名空间。所有操作都在 posts: 下。

内容是纯文本,不是 HTML。

  • - 正确:Hello world
  • 错误:

    Hello world

用户提及: @显示名称

工作流程

复制此清单并跟踪进度:

任务进度:

  • - [ ] 步骤 1:确定所需操作
  • [ ] 步骤 2:登录(auth:login)或使用现有 cookies
  • [ ] 步骤 3:执行操作
  • [ ] 步骤 4:呈现结果

步骤 1:确定操作

根据用户需求选择操作:

用户需求操作参数
认证
登录 Skool
auth:login | email, password, groupSlug |
| 帖子 | | |
| 列出帖子 | posts:list | page?, sortType? |
| 筛选帖子(日期、未回复) | posts:filter | since?, until?, notAnsweredBy?, maxPosts? |
| 获取单个帖子 | posts:get | postId |
| 创建帖子 | posts:create | title, content(纯文本), labelId? |
| 编辑帖子或评论 | posts:update | postId, title?, content? |
| 删除帖子或评论 | posts:delete | postId |
| 置顶/取消置顶帖子 | posts:pin / posts:unpin | postId |
| 点赞/取消点赞 | posts:vote | postId, vote(up 或 ) |
| 评论 | | |
| 获取评论(嵌套树形结构) | posts:getComments | postId |
| 回复帖子 | posts:createComment | content, rootId=postId, parentId=postId |
| 回复评论(嵌套) | posts:createComment | content, rootId=postId, parentId=commentId |
| 成员 | | |
| 列出成员 | members:list | page? |
| 列出待审批申请 | members:pending | (无) |
| 批准成员 | members:approve | memberId(使用 member.memberId,不是 member.id) |
| 拒绝成员 | members:reject | memberId |
| 封禁成员 | members:ban | memberId |
| 活动 | | |
| 列出日历活动 | events:list | (无) |
| 列出即将到来的活动 | events:upcoming | (无) |

步骤 2:认证

推荐流程(快速):

  1. 1. 运行一次 auth:login 获取 cookies
  2. 在所有后续调用中使用 cookies(每次约 2 秒,而非约 10 秒)
  3. Cookies 约每 3.5 天过期 — 遇到认证错误时重新登录

bash

登录并获取 cookies


export $(grep APIFY_TOKEN .env | xargs)
RESULT=$(curl -s -X POST https://api.apify.com/v2/acts/cristiantala~skool-all-in-one-api/runs?token=$APIFY_TOKEN&waitForFinish=120 \
-H Content-Type: application/json \
-d {
action: auth:login,
email: 用户邮箱,
password: 用户密码,
groupSlug: 群组标识
})

RUN_ID=$(echo $RESULT | jq -r .data.id)
COOKIES=$(curl -s https://api.apify.com/v2/actor-runs/$RUNID/dataset/items?token=$APIFYTOKEN | jq -r .[0].cookies)
echo Cookies 已保存。有效期约 3.5 天。

步骤 3:执行操作

使用 cookies(快速,约 2 秒):

bash
export $(grep APIFY_TOKEN .env | xargs)
curl -s -X POST https://api.apify.com/v2/acts/cristiantala~skool-all-in-one-api/runs?token=$APIFY_TOKEN&waitForFinish=120 \
-H Content-Type: application/json \
-d {
action: 操作名称,
cookies: 登录获取的COOKIES,
groupSlug: 群组标识,
params: { 参数 }
}

使用邮箱+密码(较慢,约 10 秒,使用 Playwright):

bash
export $(grep APIFY_TOKEN .env | xargs)
curl -s -X POST https://api.apify.com/v2/acts/cristiantala~skool-all-in-one-api/runs?token=$APIFY_TOKEN&waitForFinish=120 \
-H Content-Type: application/json \
-d {
action: 操作名称,
email: 用户邮箱,
password: 用户密码,
groupSlug: 群组标识,
params: { 参数 }
}

从数据集中获取结果:

bash
RUN_ID=$(echo $RESULT | jq -r .data.id)
curl -s https://api.apify.com/v2/actor-runs/$RUNID/dataset/items?token=$APIFYTOKEN | jq .

步骤 4:呈现结果

根据操作格式化结果:

  • - posts:list — 显示标题、作者、点赞数、评论数、链接
  • posts:getComments — 显示包含回复的嵌套评论树
  • members:pending — 显示姓名、简介、位置、申请回答、来源
  • members:list — 显示姓名、等级、积分、简介、社交链接

常见工作流程

获取过去 7 天未回复的帖子

要查找用户尚未回复的帖子,需要用户的 Skool 用户 ID。

  1. 1. auth:login → 保存 cookies
  2. members:list → 按姓名/邮箱查找用户 → 获取其 id 字段(这是用户 ID,不是 memberId)
  3. posts:filter 使用参数:
{ since: 2026-03-20T00:00:00Z, notAnsweredBy: 步骤2获取的用户ID, maxPosts: 50 }
  1. 4. 显示筛选后的帖子 — 这些是用户尚未回复的帖子

如何获取用户 ID: 运行 members:list,按 firstName/lastName 查找用户。id 字段(不是 memberId)是传递给 notAnsweredBy 的值。

替代方案 — 仅获取评论数为 0 的帖子:

  1. 1. auth:login → 保存 cookies
  2. posts:list 使用参数:{ page: 1 }
  3. 筛选 commentCount === 0 的结果

批准待审批成员

  1. 1. auth:login → 保存 cookies
  2. members:pending → 获取包含申请回答的列表
  3. 对每个要批准的成员:members:approve 使用参数:{ memberId: member.memberId }
重要提示:使用 member.memberId(成员资格 ID),不是 member.id(用户 ID)

回复帖子并提及用户

  1. 1. auth:login → 保存 cookies
  2. posts:createComment 使用参数:
- content: 好观点 @姓名!我同意你的分析。 - rootId: 帖子-id - parentId: 帖子-id(顶级评论时与 rootId 相同)

回复特定评论(嵌套)

  1. 1. posts:getComments → 查找评论 ID
  2. posts:createComment 使用参数:
- content: 感谢分享! - rootId: 原始帖子-id(始终是根帖子,绝不是评论) - parentId: 评论-id(你要回复的评论)

重要说明

  1. 1. memberId 与 id:对于批准/拒绝/封禁,使用 memberId 字段(成员资格 ID),不是 id(用户账户 ID)。两者不同。
  2. 内容格式:帖子和评论使用纯文本。切勿发送 HTML 标签。
  3. 提及:使用

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 skool-all-in-one-api-1775975473 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 skool-all-in-one-api-1775975473 技能

通过命令行安装

skillhub install skool-all-in-one-api-1775975473

下载

⬇ 下载 skool-all-in-one-api v1.0.0(免费)

文件大小: 3.54 KB | 发布时间: 2026-4-13 12:04

v1.0.0 最新 2026-4-13 12:04
Initial release: posts CRUD, nested comments, members with AI screening, events, user mentions. Cookie-based auth.

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

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

p2p_official_large
返回顶部