Error: Message is not properly signed with a valid X-Slack-Signature header

Hello, I’m currently integrating my chatbot with slack.

On the api.slack webpage under event subscriptions I tried to enable events with my url http:///webhooks/slack/webhook. It returned the message.

Your URL didn’t respond with the value of the challenge parameter."

I then tried to put the ngrok generated url in my browser as http://webhooks/slack/webhook to see what it returns. It returned the message

Message is not properly signed with a valid X-Slack-Signature header

miscellaneous details.

  • Rasa Version : 2.4.0
  • Rasa SDK Version : 2.4.0
  • Rasa X Version : None
  • Python Version : 3.7.6

Would anyone know what is troubled?

Hi @LaurentStar . The error means that the connection between your Rasa assistant and the Slack webserver hasn’t been established. A few things I’d check:

  1. When you provided your webhook url did it get verified?
  2. When you provided your webhook url was your Rasa server running (did you have your assistant running on your local machine)?
  3. Have you configured the credentials.yml file?

It did not get verified

My rasa server was running. The actions server was running

I have the following 3 credentials filled in the credentials.yml file following this guide. Slack

  • slack_channel:
  • slack_token:
  • slack_signing_secret:

How do I change incoming http are request are validate? How do I see the post request sent by slack? Whatever slack is sending my webapp/chatbot is not accepting. This is why I get the message above. I seen this issue pop up 4 times and each time it is unresolved.

Hi @LaurentStar. I just followed the instructions we have on the docs and things seem to be working fine. I think this has to do with the webhook url you are providing. Are you sure you start the ngrok on the same port as your Rasa assistant? By default the port should be 5005, so you should start your ngrok as follows:

ngrok http 5005

Once it’s up and running, copy the given url, for example: https://5d3e6d8d0b32.ngrok.io and add the suffix of webhooks/slack/webhook at the end. The URL you should be providing to your Slack app configuration should look as follows:

https://5d3e6d8d0b32.ngrok.io/webhooks/slack/webhook

Does that solve your issue? Also, do you subscribe to the necessary bot events when setting up your Slack app?

  • I have my rasa bot running on “root - Starting Rasa server on http://localhost:5005

  • I have ngrok listening on “http://(number).ngrok.io → http://localhost:5005

  • I have my rasa actions server running on “Action endpoint is up and running on http://localhost:5055

  • I am able to get the message “Hello from Rasa: 2.4.0” without the added text “/webhooks/slack/webhook”

  • My rasa bot runs in the ternimal/command line

  • The tutorial I followed is here Slack

  • This rasa doc webpage seems to address my issue but I have no idea what files the code should go into or when anything will be called. I am not able to comprehend this page or its associated github

  • My suspected issues are encoding of the header

    • RFC3986 will convert " " to “%20”
    • RFC1738 will convert " " to “+”