Microsoft ASP.NET WebHooks Slack Receiver

This sample illustrates how to wire up a Slack WebHooks receiver which can be used for both Slack Outgoing WebHooks as well as Slash Commands. A sample WebHook URI is:

https://<host>/api/webhooks/incoming/slack/{id}

Note that for security reasons the URI MUST be https.

Set the MS_WebHookReceiverSecret_Slack application setting to the Slack 'token' parameter, optionally using IDs to differentiate between multiple WebHooks, for example 'secret0, id1=secret1, id2=secret2'.

In this example we use id 'trigger' for an outgoing WebHook and id 'slash' for a slash command. This means that you should register the following URIs with Slack:

        https://<host>/api/webhooks/incoming/slack/trigger
        https://<host>/api/webhooks/incoming/slack/slash

and then configure the application setting as follows

        <add key="MS_WebHookReceiverSecret_Slack" value="trigger=<token>, slash=<token>" />
    

Please see Slack WebHooks for more information.