Thanks for your answer. I realized my question is not clear enough. My user is in a team that have public and private channels. I did not find a way to get those private channels from the API.
When I get all the channels for the connected user, I can only get the team public channels and the private messages between users but not the private channels for the team even if my user is a participant.
I can get posts from these channels if I already know the channel’s name or its id. But I can not find a way to do it programmatically since I have no trace of it when I get all the user’s channels.