Hi !
In the previous post describe the steps necessary to create a WebSite that interacts with an Alexa Skill. The next step is to publish the website in Azure. There are many tutorials on how to do this, so I will not write the necessary steps (see references)
In my case I published my Alexa Skill Website in the following url
It is important to remember the URL since it is the one that we will use in the configuration of our Skill.
Now it’s time to go back to the Amazon Developer Portal and edit the Skill we created in the 1st post. In the section [Configuration] we must define the location of the interaction endpoint, which in this case is our Azure WebApp
Important: By default the url we got from Azure is a HTTP site, we should change this to HTTPS to be used in Amazon Alexa Skill.
The other values in this section are left with their default values and we go to the [SSL Certificate] section. In the case of Azure sites, they already have a certificate for safe navigation. We must select the 2nd option.
And finally we get to the testing section [Test]. In it we can see, in JSON mode, the different messages that are sent from Alexa to our EndPoint. For example, if we invoke something simple like “help” we will have the following result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "1.0", | |
"response": { | |
"outputSpeech": { | |
"text": "Intent called AMAZON.HelpIntent.", | |
"type": "PlainText" | |
}, | |
"speechletResponse": { | |
"outputSpeech": { | |
"text": "Intent called AMAZON.HelpIntent." | |
}, | |
"shouldEndSession": true | |
} | |
}, | |
"sessionAttributes": { | |
"intentSequence": "GetEventInformationIntent;GetEventInformationIntent;AMAZON.HelpIntent", | |
"EventTopic": "hololens" | |
} | |
} |
If for example we invoke something more complicated than using Slots, we will see a different result. In this example, I ask Alexa for events about Hololens
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "1.0", | |
"response": { | |
"outputSpeech": { | |
"text": "Intent called GetEventInformationIntent. Slots used: \r\nEventTopic – hololens , ", | |
"type": "PlainText" | |
}, | |
"speechletResponse": { | |
"outputSpeech": { | |
"text": "Intent called GetEventInformationIntent. Slots used: \r\nEventTopic – hololens , " | |
}, | |
"shouldEndSession": true | |
} | |
}, | |
"sessionAttributes": { | |
"intentSequence": "GetEventInformationIntent;GetEventInformationIntent;AMAZON.HelpIntent;GetEventInformationIntent;GetEventInformationIntent;GetEventInformationIntent;AMAZON.HelpIntent;GetEventInformationIntent;GetEventInformationIntent", | |
"EventTopic": "hololens" | |
} | |
} |
Well, this gives an idea about how to connect an Azure Api App to be the EndPoint of an Alexa Skill. In the following posts we will see more details on how to add extra functionality to the backend and how to use the new Alexa test environment.
Happy Coding!
Greetings @ Toronto
El Bruno
References
Thank you Bruno !!! Following your tutorial I finally managed to connect my Alexa Skill to an Azure-based service!
LikeLike