List your Slack workspace channels, public and private
slack.slack.channels.listList the channels in your Slack workspace, public and private
- 价格
- free按供应商原价
- 成功率
- —暂无成功率数据暂无成功率数据
- 延迟 p50
- ——
- 最后验证
- —尚未验证
GEThttps://toolswitch.dev/v1/tools/slack.slack.channels.list预览在线试用即将上线供应商文档 ↗
- 可用平台额度调用
- 同步返回
- 读取公开数据
参数
the bot only sees private channels it has been /invite-d to, regardless of scopes
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| 查询参数 | ||||
limit | 整数 | 可选 | default 100, must be under 1000 | 100 |
types | 字符串 | 可选 | comma-separated: public_channel, private_channel, mpim, im. Default public_channel only — private channels need this set explicitly | public_channel,private_channel |
cursor | 字符串 | 可选 | response_metadata.next_cursor from the previous page | |
team_id | 字符串 | 可选 | required only when the token belongs to an org-wide app | |
exclude_archived | 布尔 | 可选 | default false — archived channels are included unless you opt out | true |
- 查询参数
limit整数可选default 100, must be under 1000
示例:
100types字符串可选comma-separated: public_channel, private_channel, mpim, im. Default public_channel only — private channels need this set explicitly
示例:
public_channel,private_channelcursor字符串可选response_metadata.next_cursor from the previous page
team_id字符串可选required only when the token belongs to an org-wide app
exclude_archived布尔可选default false — archived channels are included unless you opt out
示例:
true
代码示例
将 $TOOLSWITCH_KEY 替换为你在控制台创建的密钥。
预览
curl -X GET 'https://toolswitch.dev/v1/tools/slack.slack.channels.list' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/slack.slack.channels.list",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/slack.slack.channels.list", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());网关接口为预览版,地址与鉴权方式可能调整。 示例参数仅为样例数据。 调用按 free 计费,已含服务费。