Closed samcodrington-xero closed 2 years ago
Thank you for this bug report. I just published 4.15.0 of this adapter which should resolve this issue. Please let me know if you have continued problems.
https://github.com/howdyai/botkit/blob/main/packages/botbuilder-adapter-slack/src/slack_adapter.ts#L520 Should it be:
res.header('Content-Type', 'text/plain');
Are you sure this is an issue with the Botkit core module?
It could be resolved by slack or botkit however it may be able to be more easily resolved in botkit.
What are you trying to achieve or the steps to reproduce?
I am trying to subscribe a botkit bot to events from slack
npm install -g yo generator-botkit && yo botkit
npm start
BOT_TOKEN
,SIGNING_SECRET
andVERIFICATION_TOKEN
npx ngrok http 3000
What was the result you received?
Unable to pass the handshake with the following response on the UI:
Upon further inspection it appears that the server is responding with the wrong Content-Type:
text/html
rather than thetext/plain
,application/x-www-form-urlencoded
orapplication/json
which are the three response types suggested by the slack documentation . I initially thought that ngrok was perhaps suspect, modifying the response somehow:But a curl request shows that this is an issue even when the request is sent locally:
I believe that this issue can be resolved by responding to this specific request in the proper format.
What did you expect?
To be able to pass the
url_verification
handshake for events subscriptionScreenshots and animated GIFs
Context:
4.10.0
slack
v10.16.3
macos-montorey