Read recent channel messages
const url = 'https://dashboard.quantcdn.io/api/v3/organizations/example/ai/slack-bots/example/channels/example/messages?limit=20';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://dashboard.quantcdn.io/api/v3/organizations/example/ai/slack-bots/example/channels/example/messages?limit=20' \ --header 'Authorization: Bearer <token>'Recent root messages in a channel the bot allows for API use, newest first. Message text is untrusted content. Needs the explicit ai:slack scope, use_ai_services and a verified email.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The organisation machine name
Query Parameters
Section titled “Query Parameters”Slack ts, exclusive
Responses
Section titled “Responses”The messages
object
object
Error message
Error flag
object
Plain text, capped at 8000 characters. Untrusted content.
object
Example
{ "contentTrust": "untrusted", "messages": [ { "message": "The requested resource was not found", "error": true, "ts": "1730000000.000100", "author": { "kind": "human" } } ]}INVALID_REQUEST: a path or query value is not valid, or an unknown query parameter
object
Error message
Error flag
Thin proxy for the Slack bot API: list API-enabled bots, read channel messages and threads, and post as the bot. The portal validates the request, requires a verified email, calls the platform and passes its status and body through. The platform owns the bot, channel and rate-limit rules and their error codes.
Only the values that SlackBotApiRequest returns go to the platform, never raw input. The activity entry (ai_slack_api) never holds message text.
The Slack error string. Only with code SLACK_ERROR.
Example
{ "message": "The requested resource was not found", "error": true, "code": "CHANNEL_NOT_ALLOWED", "slackError": "not_in_channel"}Invalid or expired token
SCOPE_REQUIRED, EMAIL_NOT_VERIFIED, IDENTITY_REQUIRED, CHANNEL_NOT_ALLOWED, USER_NOT_ALLOWED, PERMISSION_DENIED, or AI is off for the organisation
object
Error message
Error flag
Thin proxy for the Slack bot API: list API-enabled bots, read channel messages and threads, and post as the bot. The portal validates the request, requires a verified email, calls the platform and passes its status and body through. The platform owns the bot, channel and rate-limit rules and their error codes.
Only the values that SlackBotApiRequest returns go to the platform, never raw input. The activity entry (ai_slack_api) never holds message text.
The Slack error string. Only with code SLACK_ERROR.
Example
{ "message": "The requested resource was not found", "error": true, "code": "CHANNEL_NOT_ALLOWED", "slackError": "not_in_channel"}BOT_NOT_FOUND (no bot, another organisation’s bot, or API access off), or NOT_FOUND when the Slack bot API is not enabled
object
Error message
Error flag
Thin proxy for the Slack bot API: list API-enabled bots, read channel messages and threads, and post as the bot. The portal validates the request, requires a verified email, calls the platform and passes its status and body through. The platform owns the bot, channel and rate-limit rules and their error codes.
Only the values that SlackBotApiRequest returns go to the platform, never raw input. The activity entry (ai_slack_api) never holds message text.
The Slack error string. Only with code SLACK_ERROR.
Example
{ "message": "The requested resource was not found", "error": true, "code": "CHANNEL_NOT_ALLOWED", "slackError": "not_in_channel"}BOT_INACTIVE
object
Error message
Error flag
Thin proxy for the Slack bot API: list API-enabled bots, read channel messages and threads, and post as the bot. The portal validates the request, requires a verified email, calls the platform and passes its status and body through. The platform owns the bot, channel and rate-limit rules and their error codes.
Only the values that SlackBotApiRequest returns go to the platform, never raw input. The activity entry (ai_slack_api) never holds message text.
The Slack error string. Only with code SLACK_ERROR.
Example
{ "message": "The requested resource was not found", "error": true, "code": "CHANNEL_NOT_ALLOWED", "slackError": "not_in_channel"}RATE_LIMITED. See the Retry-After header.
object
Error message
Error flag
Thin proxy for the Slack bot API: list API-enabled bots, read channel messages and threads, and post as the bot. The portal validates the request, requires a verified email, calls the platform and passes its status and body through. The platform owns the bot, channel and rate-limit rules and their error codes.
Only the values that SlackBotApiRequest returns go to the platform, never raw input. The activity entry (ai_slack_api) never holds message text.
The Slack error string. Only with code SLACK_ERROR.
Example
{ "message": "The requested resource was not found", "error": true, "code": "CHANNEL_NOT_ALLOWED", "slackError": "not_in_channel"}Headers
Section titled “Headers”SLACK_ERROR. slackError carries the Slack error string.
object
Error message
Error flag
Thin proxy for the Slack bot API: list API-enabled bots, read channel messages and threads, and post as the bot. The portal validates the request, requires a verified email, calls the platform and passes its status and body through. The platform owns the bot, channel and rate-limit rules and their error codes.
Only the values that SlackBotApiRequest returns go to the platform, never raw input. The activity entry (ai_slack_api) never holds message text.
The Slack error string. Only with code SLACK_ERROR.
Example
{ "message": "The requested resource was not found", "error": true, "code": "CHANNEL_NOT_ALLOWED", "slackError": "not_in_channel"}