slack send message [ERROR] missing required field: channel

Viewed 905

I am trying to test sending message to channel via bot (App, to be exact.)

My query in Postman: https://slack.com/api/chat.postMessage/ (there is token in headers) and body {"channel":"XXX","text":"I hope the tour went well, Mr. Wonka."}

But as result { "ok": false, "error": "invalid_arguments", "response_metadata": { "messages": [ "[ERROR] missing required field: channel" ] } }

2 Answers

I had the same issue and my problem was that I was doing GET instead of POST. Now it works for me.

Please check your content-type header. It should be "application/json" instead of "plain/text"

Related