Search code examples
slackslack-api

Retrieve Slack private channels without adding bot to them


I want to retrieve all channels in my workspace using Slack API but my private channels are not listed unless I add my bot to them using Slack desktop/mobile app

Is this even possible to accomplish? Since the scope for reading private channels states:

View basic information about private channels that your slack app has been added to

which implies I should add my bot to the channel before reading it.


Solution

  • Bot users behave similarly to regular Slack users in that they only have visibility into conversations they are members of. Unfortunately, there is no way to gather private channel data without the bot being in the channel.