0
votes

I'm trying to communicate slack with my application using https://api.slack.com/interactive-messages documentation. I'm facing one issue while trying to send interactive message from slack to my-app. Here is my app. https://gitlab.com/sureshgoud9999/slack-api-test.git

I've placed one "/api/messages" end-point of "POST" method to respond for interactive messages from slack, here is the flow,

oauth-route.js oauth-dao.js

Even though, I added bodyParser.urlencoded({ extended: false }) in server.js file, it is not redirecting the request to proper method. Message deliver is failed while clicking on any buttons from slack.

Please help me out if I'm missing anything.

2

2 Answers

0
votes

The issue was with URL-encoder. Its solved now.

0
votes

@ErikKalkoken Here are the tutorials mentioned, https://api.slack.com/tutorials/tags/slack-apps https://api.slack.com/tutorials/intro-to-message-buttons

passing urlencoder to the endpoint was not proper,

var urlencodedParser = bodyParser.urlencoded({ extended: false })
app.post('/slack/slash-commands/send-me-buttons', urlencodedParser, (req, res) =>{ ...}