Docs
/
/

List channels

List Slack channels for a Slack workspace.

List channels

List Slack channels for a Slack workspace.

Endpoint

GET/v1/providers/slack/{channel_id}/channels

Rate limit

Tier 2

Path parameters

channel_id
string

The ID of the Knock Slack channel to get channels for.

Query parameters

access_token_object
string

A JSON encoded string containing the access token object reference.

query_options.cursor
string

Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection.

query_options.limit
integer

The maximum number of channels to return. Defaults to 200.

query_options.exclude_archived
boolean

Set to true to exclude archived channels from the list. Defaults to true when not explicitly provided.

query_options.types
string

Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im. Defaults to "public_channel,private_channel". If the user's Slack ID is unavailable, this option is ignored and only public channels are returned.

query_options.team_id
string

Encoded team ID (T1234) to list channels in, required if org token is used.

Returns

ChannelsForSlackProviderResponse

The response from a Slack provider request, containing a list of channels.

next_cursor
string

Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection.

slack_channels
object[]

List of Slack channels.

context_team_id
string
Required

The team ID that the Slack channel belongs to.

id
string
Required

A Slack channel ID from the Slack provider.

is_im
boolean
Required

Whether the Slack channel is an IM channel.

is_private
boolean
Required

Whether the Slack channel is private.

name
string
Required

Slack channel name.

AuthenticationError

Authentication error response

code
string

The error code.

message
string

The error message.

status
integer

The HTTP status code.

type
string

The error type.

New chat