List API-enabled Slack bots
const url = 'https://dashboard.quantcdn.io/api/v3/organizations/example/ai/slack-bots/api-enabled';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/api-enabled \ --header 'Authorization: Bearer <token>'Lists the Slack bots this token can use through the API, with the public channels each bot allows. Needs a token with the explicit ai:slack scope (not full_access, not a token without a scope list), the use_ai_services permission and a verified email. Limit: 60 requests per minute per token.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The organisation machine name
Responses
Section titled “Responses”The API-enabled bots
object
object
object
Examplegenerated
{ "bots": [ { "botId": "example", "name": "example", "workspaceId": "example", "channels": [ { "id": "example", "name": "example", "isPrivate": true } ] } ]}Invalid or expired token
SCOPE_REQUIRED (token lacks ai:slack, is full_access or has no scope list), EMAIL_NOT_VERIFIED, IDENTITY_REQUIRED, 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"}NOT_FOUND: 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"}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
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"}