Read recent messages from a Slack channel
slack.slack.messages.historyRead recent messages from a Slack channel
- 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.messages.historyPreview- Uses platform quota
- Synchronous response
- Reads public data
Parâmetros
returns top-level messages only — thread replies come from conversations.replies. Message authors arrive as user IDs (U…); resolve them with users.info or users.list
| Parâmetro | Tipo | Obrigatório | Descrição | Exemplo |
|---|---|---|---|---|
| Parâmetros de consulta | ||||
limit | inteiro | Opcional | default 100, max 999 — but see the unlisted-app cap of 15 in the file header | 15 |
cursor | string | Opcional | response_metadata.next_cursor from the previous page | |
latest | string | Opcional | only messages before this Unix timestamp | |
oldest | string | Opcional | only messages after this Unix timestamp | 1700000000.000000 |
channel | string | Obrigatório | channel ID (C…) | C0123456789 |
inclusive | booleano | Opcional | include messages sitting exactly on the oldest/latest bounds | |
- Parâmetros de consulta
limitinteiroOpcionaldefault 100, max 999 — but see the unlisted-app cap of 15 in the file header
Exemplo:
15cursorstringOpcionalresponse_metadata.next_cursor from the previous page
lateststringOpcionalonly messages before this Unix timestamp
oldeststringOpcionalonly messages after this Unix timestamp
Exemplo:
1700000000.000000channelstringObrigatóriochannel ID (C…)
Exemplo:
C0123456789inclusivebooleanoOpcionalinclude messages sitting exactly on the oldest/latest bounds
Exemplos de código
Substitua $TOOLSWITCH_KEY pela chave criada no console.
curl -X GET 'https://toolswitch.dev/v1/tools/slack.slack.messages.history' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/slack.slack.messages.history",
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.messages.history", {
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.