Install
openclaw skills install @thcjp/slack-api-toolkitSlack API托管OAuth,发消息/管频道/搜会话(社区下载版)。Slack API integration with managed OAuth。Send messages, manage channels,。触发关键词: oauth, api, managed, integration, slack。
openclaw skills install @thcjp/slack-api-toolkitAccess the Slack API with managed OAuth authentication. Send messages, manage channels, list users, and automate Slack workflows.
详细内容已移至
references/detail.md
https://api.maton.ai/slack/{method}
Maton proxies requests to slack.com and automatically injects your OAuth token.
NPM:
npm install -g @maton/cli
Homebrew:
brew install maton-ai/cli/maton
详细内容已移至
references/detail.md
Manage your Slack OAuth connections at https://api.maton.ai.
详细内容已移至
references/detail.md
详细内容已移至
references/detail.md
详细内容已移至
references/detail.md
详细内容已移至
references/detail.md
详细内容已移至
references/detail.md
GET /slack/api/auth.test
Returns current user and team info.
Example:
maton slack whoami
详细内容已移至
references/detail.md- ### Messages 详细内容已移至references/detail.md- ### Conversations (Channels) 详细内容已移至references/detail.md- ### Direct Messages
详细内容已移至
references/detail.md
详细内容已移至
references/detail.md
详细内容已移至
references/detail.md
GET /slack/api/bots.info?bot=B0123456789
Example:
maton slack bot view B0123456789
Note: this expects the B-prefixed bot ID (from bot_id on a message), not the bot's U-prefixed user ID. Passing a U… ID returns bot_not_found.
GET /slack/api/search.messages?query=keyword
Example:
maton slack search messages 'keyword'
GET /slack/api/search.files?query=keyword
Note: search.files matches against filename and title, not file body content. Newly uploaded files may take a moment to appear in results due to indexing lag.
为了提升功能完整性,以下是对Slack API功能的详细列表,包括边界条件处理。
功能列表:
边界条件处理:
以下是对Slack API输入输出参数的详细说明,包括默认值、类型和取值范围。
输入参数:
channel: 频道ID,类型为字符串,必填。text: 消息内容,类型为字符串,必填。file: 文件对象,类型为二进制数据,可选。ts: 消息时间戳,类型为字符串,可选。emoji: 表情,类型为字符串,可选。输出参数:
ok: 操作是否成功,类型为布尔值。error: 错误信息,类型为字符串。data: 返回的数据,类型为对象数组。默认值:
以下是对Slack API错误码的定义和处理方案。
错误码:
invalid_api_key: 无效的API密钥。missing_scope: 缺少必要的权限。invalid_request: 无效的请求。not_found: 资源未找到。rate_limit_exceeded: 超出请求频率限制。处理方案:
invalid_api_key: 检查API密钥是否正确。missing_scope: 联系Maton Support请求增加权限。invalid_request: 检查请求参数是否正确。not_found: 检查资源是否存在。rate_limit_exceeded: 等待一段时间后重试。maton slack message send --channel C0123456789 --text 'Hello team'
maton slack channel list --types public_channel,private_channel
maton slack user lookup --email alice@example.com
maton slack reaction add --channel C012 --ts 1700000000.000100 --emoji thumbsup
const response = await fetch('https://api.maton.ai/slack/api/chat.postMessage', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${process.env.MATON_API_KEY}`
},
body: JSON.stringify({ channel: 'C0123456', text: 'Hello!' })
});
const result = await response.json();
console.log(result);
import os
import requests
response = requests.post(
'https://api.maton.ai/slack/api/chat.postMessage',
headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'},
json={'channel': 'C0123456', 'text': 'Hello!'}
)
print(response.json())
C (public), G (private/group), D (DM)U, Bot IDs start with B, Team IDs start with Tts) are unique identifiersmrkdwn type for Slack-flavored markdown formattingthread_ts to reference the parent messagecursor from response_metadata.next_cursorcurl -g when URLs contain brackets (fields[], sort[], records[]) to disable glob parsingjq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments. You may get "Invalid API key" errors when piping.| Status | Meaning |
|---|---|
| 400 | Missing Slack connection |
| 401 | Invalid or missing Maton API key |
| 429 | Rate limited (10 req/sec per account) |
| 4xx/5xx | Passthrough error from Slack API |
Missing Scope Errors: If you encounter missing_scope errors, contact to request additional scopes for your connection.
CLI:
maton whoami
maton connection list
Manual:
MATON_API_KEY environment variable is set:echo $MATON_API_KEY
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
slack. For example:https://api.maton.ai/slack/api/chat.postMessagehttps://api.maton.ai/api/chat.postMessage| 依赖项 | 类型 | 是否必需 | 获取方式 |
|---|---|---|---|
| LLM API | API | 必需 | 由Agent内置LLM提供 |
| 场景 | 输入 | 输出 |
|---|---|---|
| 基础使用 | 用户请求 | 处理结果 |
不适用于:需要人工判断的复杂决策场景
A: 请先阅读使用流程章节,确认环境满足依赖说明中的要求。
A: 请参考错误处理章节,按照表格中的处理方式操作。
A: 请参考已知限制章节了解具体限制。
Slack API托管OAuth的独特之处在于其简化了OAuth流程,用户无需手动配置OAuth客户端,从而降低了使用门槛。此外,Maton提供的代理服务进一步提升了API的可用性和安全性。
技术亮点:
差异化优势:
与同类方案相比,Slack API托管OAuth具有以下优势。
同类方案:
优势:
Slack API托管OAuth解决了以下真实验证痛点。
痛点:
解决方案:
Slack API托管OAuth的技术或方法创新点主要体现在以下方面。
创新点: