Search code examples
node.jsintegrationslack-apislack

Get channel list in Slack


I'm using Incoming webhooks to send message to the channel. I decide the channel in JSON format.

var message = {
    "text" : "text",
    "channel" : "#general",
    "username" : "me"
};

How can I get the list of channels in Slack?


Solution

  • You would need to use the Web API. Incoming webhooks are insufficient for this.

    (Specifically, you want channels.list.)