Skip to content

List Channels

Endpoint used to list channels of a Discord server.

Terminal window
curl --request POST \
--url https://chat.api.toolzz.com.br/api/v1/discord/channels \
--header 'Authorization: Bearer TOKEN_HERE' \
--header 'Content-Type: application/json' \
--data '{
"botToken": "<discord bot token>",
"guildId": "<server id>"
}'
{
"data": [
{
"id": "string_digits",
"name": "string",
"type": 0,
"guild_id": "string_digits",
"parent_id": "string_digits | null",
"topic": "string | null",
"nsfw": false,
"position": 1,
"icon_emoji": {
"id": null,
"name": "string"
}
}
]
}

ParameterTypeDescriptionRequired
AuthorizationStringAccess token (“Bearer” must be before the token)Yes
ParameterTypeDescriptionRequired
botTokenStringSecret token (Bot Token) obtained from the Discord Developer Portal.Yes
guildIdStringNumeric ID (Snowflake) of the Discord server.Yes
KeyTypeDescription
data[]ArrayList of objects containing the server channels and categories.
idStringSnowflake ID (numeric) of the channel or category.
nameStringVisible name of the channel or category.
typeNumberResource type: 0 (Text), 2 (Voice), 4 (Category).
guild_idStringID of the server to which this channel belongs.
positionNumberDisplay order in the Discord sidebar.
parent_idString/NullID of the parent category (returns null if it is a category).
topicString/NullDescription or topic defined for the text channel.
nsfwBooleanIndicates if the channel has age restriction (Not Safe For Work).
last_message_idString/NullID of the last message sent in the channel.
rate_limit_per_userNumber”Slow Mode” time in seconds configured in the channel.
icon_emojiObjectObject containing the custom channel emoji (id and name).
bitrateNumberBitrate (only for voice channels, e.g., 64000).
user_limitNumberMaximum user limit (only for voice channels).
permission_overwritesArrayList of specific permissions applied to roles or users in the channel.
flagsNumberInternal Discord configuration flags.

To access this endpoint, it is necessary to send a valid access token through the authorization header (Authorization) of the request. Additionally, the API is protected by other security measures to safeguard user data.

To access your access token, follow these steps:

  1. Log in to the ToolzzAI platform
  2. Click on “Settings”
  3. Click on “Access Token”
  4. Copy the access token

Access token page