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?
Here is how Slack's security architecture works, which explains why you don't get all private channels with conversations.list
.
A user only can only see private channel he is a member of. That includes users with admins and owner role, so even the creator of a workspace does not see private channels he is not invited to.
There are two types of tokens:
There are two workarounds to get access to all channels:
Ensure a the generic user (e.g. slackadmin
) is a member of all private channels. Then using his access token a Slack app also has access to all those private channels. This is an organizational solution.
Collect the tokens of all users on your workspace and then use those tokens to access all conversations incl. private channels their are a member of. This can be achieved by asking every user to install your Slack app once (via standard OAuth "Add to Slack" process), which is called a configuration in Slack terms.