#Tutorial – How to build an #Amazon #AlexaSkill using Visual Studio 2017, C# and #Azure (3 on N)

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

http://alexaskillbrunoevents.azurewebsites.net/

I1

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

I2

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.

I3

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

I4


{
"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

I5


{
"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

1 comment

  1. Thank you Bruno !!! Following your tutorial I finally managed to connect my Alexa Skill to an Azure-based service!

    Like

Leave a Reply to Gustavo Fischer Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: