'Slack conversations.list method does not list all the channels

I have a slack application and I have authenticated using this application. When I list all the channels, some of the private channels are not listed. Do we need the access token of workspace admin to list all the private and public channels?



Solution 1:[1]

Stumbled across this question when Googling for a similar issue in a large org - I was getting the public channels, but not all of them were showing.

Turns out Slack has a default limit of returning 100 channels. To bypass this, simply pass a limit: 9999 parameter, eg:

  app.client.conversations.list({
    token: process.env.SLACK_BOT_TOKEN,
    limit: 9999
  }).then((res: any) => {...})

See also: conversations.list API

Solution 2:[2]

response = client.conversations_list(types="public_channel, private_channel")

See https://slack.dev/python-slackclient/conversations.html

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dr-Bracket
Solution 2