Im using the bot token to get the channel list, but im only getting the public channels not private channels and DMs where the bot has been added to
Here is the permission i have
channels:readgroups:readim:readmpim:read
const response = await axios.post('https://slack.com/api/conversations.list', {
exclude_archived: true,
types:
"public_channel,private_channel,mpim,im"
} ,{
headers: { Authorization: `Bearer ${accessToken}` },
});
const channels = response.data.channels;
const channelList = channels.map((channel) => {
if(!channel.is_archived){
return{
channel_name: channel.name_normalized,
channel_id: channel.id
}
return undefined;
})
.filter((channel) => channel !== undefined)
The bot token will be something like this xoxe.xoxb-1-MS0yLTUyNjI5ODk.......
Why i cant get the private channels ? the bot has been authorized in the workspace.