I am trying to use the api to get a list of members of a channel. Slack has an api call /api/channels.info?channel=id
What is the correct way of doing this in Mattermost?
Also when is the Web service documentation ready? Because at the moment I get 404 errors if I go to a incorrect page so it is very difficult to get a list of commands which are possible.
Thanks
Hi @tht13. The current api to do that is /api/v1/channels/<CHANNEL_ID>/extra_info/<LIMIT>
. From that, you’ll get a json blob of the form
{
id: CHANNEL_ID,
members: A list of up to LIMIT truncated User objects with user id, nickname, email, and username
member_count: The number of members in the channel including those not returned due to the limit
}
I believe that a limit of -1 will also cause the system to give you all members of that channel, but I’m not 100% certain of that.
1 Like