Configure Slack authentication token

2019-06-13 19:32发布

问题:

Trying to figure out how to configure slack authentication token with azure functions. First, attempted to create an app setting just like for WebJobs (MS_WebHookReceiverSecret_Slack) but it doesn't seem to work. The error I get is

The 'token' parameter provided in the HTTP request did not match the expected value.

回答1:

In Functions, you do not configure the ASP.NET WebHook receiver info via App Settings. When you create a WebHook function, we generate and store the configuration in our own light weight secret store in the Function App. We do this to avoid the site restart cost when such functions are added.

For example, if you start from the GitHub WebHook templates we have (either C# or Node), you'll see this in action. We hand you the trigger URL and GitHub secret required in the Develop tab UI.

Even though the Functions runtime makes ALL the ASP.NET WebHook Receivers available (we register them in the runtime), our UI and templates haven't caught up yet. You can start from an Http template then select the WebHook type on the Integrate tab to get it set up.

We'll be onboarding the rest of the receivers into the UI (and some templates as well) soon. The issue is that there are many and we haven't had a chance to test them all out yet with Functions to ensure the end to end flows work flawlessly. You may still run into issues with Content-Types etc. until we have a chance to give them all the love they deserve :) We have some issues in our repo tracking that. Feel free to open your own issues as you run into them and we'll address them, thanks :)