List your Slack workspace channels, public and private
slack.slack.channels.listList the channels in your Slack workspace, public and private
- Price
- freeAt provider cost
- Success rate
- —No success-rate data yetNo success-rate data yet
- Latency p50
- ——
- Last verified
- —Not verified yet
GEThttps://toolswitch.dev/v1/tools/slack.slack.channels.listPreview- Uses platform quota
- Synchronous response
- Reads public data
Parameters
the bot only sees private channels it has been /invite-d to, regardless of scopes
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| Query parameters | ||||
limit | integer | Optional | default 100, must be under 1000 | 100 |
types | string | Optional | comma-separated: public_channel, private_channel, mpim, im. Default public_channel only — private channels need this set explicitly | public_channel,private_channel |
cursor | string | Optional | response_metadata.next_cursor from the previous page | |
team_id | string | Optional | required only when the token belongs to an org-wide app | |
exclude_archived | boolean | Optional | default false — archived channels are included unless you opt out | true |
- Query parameters
limitintegerOptionaldefault 100, must be under 1000
Example:
100typesstringOptionalcomma-separated: public_channel, private_channel, mpim, im. Default public_channel only — private channels need this set explicitly
Example:
public_channel,private_channelcursorstringOptionalresponse_metadata.next_cursor from the previous page
team_idstringOptionalrequired only when the token belongs to an org-wide app
exclude_archivedbooleanOptionaldefault false — archived channels are included unless you opt out
Example:
true
Code samples
Replace $TOOLSWITCH_KEY with the key you created in the console.
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());This gateway API is in preview; its URL and authentication may change. The example parameters are sample data. Calls are billed at free, including the service fee.