List channels
const url = 'https://desk.example.com/api/v1/channels';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://desk.example.com/api/v1/channels \ --header 'Authorization: Bearer <token>'Required scope: channels:read
Lists the channels the token’s subject may view within its acting team, ordered by name. A bot sees only the channels it belongs to; a personal access token sees what the person sees in the app — every public channel in the team plus the private ones they belong to.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The channels the subject may view.
object
object
Whether the channel is open to the whole team or invite-only.
Whether this is the workspace’s default channel.
Whether this is a direct-message conversation.
Example
{ "data": [ { "visibility": "public" } ]}The token is missing, malformed, or revoked.
The shape every error response carries.
object
Examplegenerated
{ "message": "example"}The token lacks the scope this operation requires, or its subject may see the resource but not perform this action on it.
The shape every error response carries.
object
Examplegenerated
{ "message": "example"}The resource does not exist, is outside the token’s workspace, or the
integrations platform is disabled. A channel the subject cannot see is
reported here rather than as a 403, so the API never leaks its
existence.
The shape every error response carries.
object
Examplegenerated
{ "message": "example"}The per-token rate limit (INTEGRATIONS_API_RATE_LIMIT requests per
minute) was exceeded. Retry after the Retry-After header.
The shape every error response carries.
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”Seconds to wait before retrying.