List your Slack workspace channels, public and private
slack.slack.channels.listList the channels in your Slack workspace, public and private
- Price
- freePelo preço do provedor
- Success rate
- —Ainda não há dados da taxa de sucessoAinda não há dados da taxa de sucesso
- Latency p50
- ——
- Last verified
- —Not verified yet
GEThttps://toolswitch.dev/v1/tools/slack.slack.channels.listPreview- Uses platform quota
- Synchronous response
- Reads public data
Parâmetros
the bot only sees private channels it has been /invite-d to, regardless of scopes
| Parâmetro | Tipo | Obrigatório | Descrição | Exemplo |
|---|---|---|---|---|
| Parâmetros de consulta | ||||
limit | inteiro | Opcional | default 100, must be under 1000 | 100 |
types | string | Opcional | comma-separated: public_channel, private_channel, mpim, im. Default public_channel only — private channels need this set explicitly | public_channel,private_channel |
cursor | string | Opcional | response_metadata.next_cursor from the previous page | |
team_id | string | Opcional | required only when the token belongs to an org-wide app | |
exclude_archived | booleano | Opcional | default false — archived channels are included unless you opt out | true |
- Parâmetros de consulta
limitinteiroOpcionaldefault 100, must be under 1000
Exemplo:
100typesstringOpcionalcomma-separated: public_channel, private_channel, mpim, im. Default public_channel only — private channels need this set explicitly
Exemplo:
public_channel,private_channelcursorstringOpcionalresponse_metadata.next_cursor from the previous page
team_idstringOpcionalrequired only when the token belongs to an org-wide app
exclude_archivedbooleanoOpcionaldefault false — archived channels are included unless you opt out
Exemplo:
true
Exemplos de código
Substitua $TOOLSWITCH_KEY pela chave criada no 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());Esta API de gateway está em prévia; a URL e a autenticação podem mudar. Os parâmetros do exemplo são dados de amostra. As chamadas são cobradas a free, incluindo a taxa de serviço.