0

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.

Janusz Nowak
  • 2,595
  • 1
  • 17
  • 36
Sean Feldman
  • 23,443
  • 7
  • 55
  • 80

1 Answers1

0

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 :)

mathewc
  • 13,312
  • 2
  • 45
  • 53
  • thank you for explanation. I assumed that when working with a well defined Slack webhook, I should be able to configure the token, regardless of where it stored. Is that assumption incorrect? – Sean Feldman Apr 30 '16 at 16:53
  • 1
    Yes, the tokens just live in the file system. We'll have Portal UI for configuring them, we haven't got to that yet. We generate them for you initially to get you up and running quickly, but we'll also allow you to change/manage those. – mathewc Apr 30 '16 at 18:13
  • @mathewc I'm trying to use Functions now, but I don't see 'Slack' in the webhook options, only 'Generic JSON' and 'GitHub'. If I use the Advanced config and set the type to Slack, it doesn't complain, but it also doesn't show a token, and all requests get the response `"Message":"The 'token' parameter provided in the HTTP request did not match the expected value."}`. Is Slack temporarily disabled? – dsample May 16 '16 at 21:17
  • Yes, it is disabled until we can fix the issues that were discovered with it. See tracking item https://github.com/Azure/azure-webjobs-sdk-script/issues/317 – mathewc May 16 '16 at 21:32