Read recent messages from a Slack channel
slack.slack.messages.historyRead recent messages from a Slack channel
- 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.messages.historyPreview- Uses platform quota
- Synchronous response
- Reads public data
Parameters
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
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| Query parameters | ||||
limit | integer | Optional | default 100, max 999 — but see the unlisted-app cap of 15 in the file header | 15 |
cursor | string | Optional | response_metadata.next_cursor from the previous page | |
latest | string | Optional | only messages before this Unix timestamp | |
oldest | string | Optional | only messages after this Unix timestamp | 1700000000.000000 |
channel | string | Required | channel ID (C…) | C0123456789 |
inclusive | boolean | Optional | include messages sitting exactly on the oldest/latest bounds | |
- Query parameters
limitintegerOptionaldefault 100, max 999 — but see the unlisted-app cap of 15 in the file header
Example:
15cursorstringOptionalresponse_metadata.next_cursor from the previous page
lateststringOptionalonly messages before this Unix timestamp
oldeststringOptionalonly messages after this Unix timestamp
Example:
1700000000.000000channelstringRequiredchannel ID (C…)
Example:
C0123456789inclusivebooleanOptionalinclude messages sitting exactly on the oldest/latest bounds
Code samples
Replace $TOOLSWITCH_KEY with the key you created in the 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());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.