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?
You would need to use the Web API. Incoming webhooks are insufficient for this.
(Specifically, you want channels.list.)