Search code examples
c#botframeworkasp.net-core-webapiazure-language-understandingcortana

Does Cortana support webhooks / calling external API's?


I've been trying out to create skills for Cortana and would like to hook it up to a .NET Core web API that I made. This web API already contains implementations for Google Home and Alexa and I would like to add Cortana communication to this web API.

Currently I've looked into the examples on the microsoft website and played around with them. The examples give me a .zip file with a pre-generated project which handles the requests, I would like to use my own web API for this.

When publishing apps in LUIS I found some info on endpoints under the Keys and Endpoint settings, but it doesn't seem to be a kind of endpoint that I'm looking for.

Is it possible to use personal Web API's to handle intent behavior similar to Dialogflow webhooks or Alexa Endpoints for Cortana bots?

Any links or other references would be very helpful.

Thanks in advance!


Solution

  • Using a Bot Channels Registration, a Cortana connected skill will make POST calls to the configured Messaging Endpoint:

    enter image description here

    All Bot Framework services use industry-standard REST and JSON over HTTPS and communicate with messages based on the Bot Framework -- Activity schema. With the Cortana channel, when a POST is received at the Messaging Endpoint the code must acknowledge the call (HttpStatus 200) and send return messages within 10 seconds (serviceUrl is the base url for the destination). Your code can call into whatever other services or apis you require during that time.

    The Bot Builder SDK helps enable more easily communicating with Bot Framework services, including the Cortana Connector Services.