---
title: "Fetches all channels in a specified guild."
method: POST
path: "/fetchChannels"
---

# Fetches all channels in a specified guild.

`POST /fetchChannels`

This function retrieves a list of all channels within a specific guild on Discord. It takes a guild ID as input and returns a Promise that resolves to an array of channel objects. This can be useful for obtaining information about the structure and available communication channels within a particular Discord server.

## Request body

- object
  - `body` object — Body of the fetchChannels sls call
    - `arguments` unknown[], required
      - unknown
    - `auth` object — Authentication object
      - `strategy` 'apikey' — Authentication strategy
      - `variables` unknown[] — Variables for the authentication strategy
        - unknown
    - `packageName` string — @microfox/discord

## Response `200`

Successful response

- object[]
  - `id` string — The ID of the channel
  - `name` string — The name of the channel
  - `type` integer — The type of the channel

## Other responses

- `400` — Bad Request - Invalid guild ID
- `403` — Forbidden - Insufficient permissions to access the guild
- `404` — Not Found - Guild not found
- `500` — Internal Server Error

---

[API](https://skmtc.net/microfox-ai/apis/microfox-discord-sdk-api.md) · [All operations](https://skmtc.net/microfox-ai/apis/microfox-discord-sdk-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/microfox-ai/microfox-discord-sdk-api/versions/7cb5b64ae924/schema)
