alexa-app | A framework for Alexa apps using Node.js | Runtime Evironment library
kandi X-RAY | alexa-app Summary
kandi X-RAY | alexa-app Summary
This module parses HTTP JSON requests from the Alexa platform and builds the JSON response that consumed by an Alexa-compatible device, such as the Echo. It provides a DSL for defining intents, convenience methods to more easily build the response, handle session objects, and add cards. The intent schema definition and sample utterances are included in your application's definition, making it very simple to generate hundreds (or thousands!) of sample utterances with a few lines. This module provides a way to host a standalone web service for an Alexa skill. If you're looking for a full-fledged application server or the ability to host multiple skills, check out alexa-app-server.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Constructor for an application .
- Normalizes an api path
alexa-app Key Features
alexa-app Examples and Code Snippets
Community Discussions
Trending Discussions on alexa-app
QUESTION
I tried to connect my Alexa AWS Lambda function (node.js 6.10) with Azure Activ Directory to my Azure-Cloud-API. After reading the documentation from amazon and many tutorials I have now a working Account Linking. That means, I can link the Account of the Skill inside the Alexa-App on my smartphone.
AccountLinking for my Custom Skill: {Data from my azure portal}
- Authorization Grant Type: Auth Code Grant
- Authorization URI: {OAUTH 2.0 AUTHORIZATION ENDPOINT}
- Access Token URI: {OAUTH 2.0 TOKEN ENDPOINT}
- Client ID: b9c6[...]bc60 {Application ID}
- Client Secret: {Client Secret}
- Client Authentication Scheme: Credentials in request body
- scope: openid
- domain: empty
- redirect urls: --> In Azure portal as ALLOWED TOKEN AUDIENCES and Reply URLs defined
In my aws lambda function I get the event request from alexa like the documentation says with properties for version, session, context, request...
My understanding of the documentation is, that the token I need for the Azure-Cloud-API-Request should be here: session.user.accessToken But this token doesn't look like the one I need and after my test runs I get always "Unauthorized" back. The Token looks something like this and is 1252 characters long:
AQABAAAAAADX8GCi6Js6SK82TsD2Pb7rqGN56iHT_YSxlSr1RAdXucGs0S3ykOaw0XZ1WnjJotqZAn9BH7agRbP0VQv2rnJuRw_aJil7 [...] JIEO2Ap4wuG-tTwiSmZBfbLhyYtwQmxLAkqiLApqFmBYcyu-dnzlVV4liDGyTQ7gAXufd3zt7QGmi3UfP1aL9f5NBeXbmxnU6FHRzF10QZa19pTQgNTtIK8oIAA
If I configure postman and send a request to the azure activ directory I get a accessToken like this (1168 characters long):
eyJ0eXAiOiJKV1QiLCJhbGc [...] Ezbk5aY2VEYyJ9.eyJhdWQiOiJodHRwczovL21ldGVvcmEtYXBwLmF [...] kY5MWVUUXdBQSIsInZlciI6IjEuMCJ9.KJco47-FdJ_eeqv38LL [...] YK_4JqCRDw
This one looks like a jwt-token and if I copy this token directly in my aws lambda function and use this one for the Azure-Cloud-API-Request it works (until the token expires).
Now I'm not sure if there is a problem in my configuration of the account linking? Or do I have to do something with the token from alexa to get the real one? Or is the real token somewhere else and I have to fetch it there?
Thanks a lot for your help!
Amazon Documentation "Alexa Skills Kit":
https://developer.amazon.com/docs/custom-skills/link-an-alexa-user-with-a-user-in-your-system.html
EDIT (Solution) 11.06.2018- Authorization Grant Type: Auth Code Grant
- Authorization URI: {OAUTH 2.0 AUTHORIZATION ENDPOINT} + ?resource= + {Application ID}
- Access Token URI: {OAUTH 2.0 TOKEN ENDPOINT}
- Client ID: b9c6[...]bc60 {Application ID}
- Client Secret: {Client Secret} App>Settings>Keys new Key with expiration date = 2 years
- Client Authentication Scheme: Credentials in request body
- scope: empty
- domain: empty
- redirect urls: --> In Azure portal as ALLOWED TOKEN AUDIENCES and Reply URLs defined
ANSWER
Answered 2018-Jun-06 at 01:28It sounds like you haven't completed the account linking sequence for your skill. After setting the account linking configuration you need to open the Alexa app (on your phone or https://alexa.amazon.com) and go to your new skill and link your account. Once that is successful you will get a token in request.Session.User.AccessToken
.
The blog post: https://blogs.msdn.microsoft.com/premier_developer/2017/12/09/amazon-alexa-skills-authenticated-by-azure-active-directory-and-backed-by-asp-net-core-2-0-web-api-hosted-on-azure/ needs to be updated with the following:
- You can ignore the sections about the "front end" app registration.
- In Alexa account linking section update URLs to use login.microsoftonline.com instead of login.windows.net
- ClientId to be the Application Id of the "back end" app registration
- The
?resource=
has to be set and has to be the same as the audience parameter for the JWT bearer options. This is ClientId if you use the .Net Core 2.0 template in Visual Studio. - The client secret (key) that is used can not be one that "Never Expires". Use a 1 or 2 year duration.
QUESTION
Is it possible to run alexa skill locally with ngrok instead AWS? I built a skill in AWS Lambda but I would rather use my own server. What can I do to run Alexa locally?
I tried https://github.com/alexa-js/alexa-app-server but it makes any sense because I would need to rewrite my whole code :( The better solution is http://docs.bespoken.tools/en/latest/tutorials/tutorial_lambda_nodejs/ but it isn't the best. It just works only for a wellcome intent and freezes after that :(
Terminal Logs from bespken command:
...ANSWER
Answered 2020-Jan-26 at 20:38Yes, there are several solutions for running your node lambda locally. I've been using node-lambda, for example. Like most solutions it is oriented to users who want to test locally and then easily deploy to AWS Lambda.
If you want to run them yourself, I would note that MS and IBM have made their implementations of lambda open-source (here's MS's and IBM's). I haven't actually tried it myself, and I would note that with AWS, GCP, and Azure all providing Lambda services for node the market for these is healthy and the lock-in is minimal so I feel less need to be able to run it myself than for something like Dynamo.
But I also recommend that you continue to pursue BST. I'm using some of my own pieces for testing my skills because I got started before I heard of their stuff, but what I have tried of their's (BSTAlexa) is very useful and I see that they provide some of the other pieces you need for easy and effective testing of your skill.
QUESTION
I am looking to create a simple coffee ordering skill for the office. I am new to node and amazon alexa. I am using the alexa-app package. I want Alexa to respond to my response with a different question or separate intent depending on my request. What is the best way to do about this? I am having difficulty seeing how to trigger a new intent.
Example conversation flow:
Me: Alexa, start office Assitant
Alexa: How can I help?
Me: I would like order some coffees. (or any other services)
New intent started based on request
Alexa: Great, what would you like?
...ANSWER
Answered 2019-Jul-30 at 08:26In the response to "I would like to order some coffees", you can send a response to the Alexa Cloud Service specifying shouldEndSession
as false. See the documentation on the response object here. This will make the Echo continue to listen for a second user intent.
You can have a separate utterance which will map to an intent to order a specific sort of coffee (maybe using the custom slot type syntax):
QUESTION
have been going different routes for 2 days now and can't figure it out. Perhaps someone can shed some light on my problems. I am trying to run a botserver that connects to multiple plaforms and already have around 5 working.
I am now also trying to integrate Alexa. I am seeing Alexa requests coming into my server (so the Alexa skill and endpoint config are correct), however this also took me quite some time as Amazon apparently only sends traffic to port 443, so defining another port number in Amazon dev center is allowed, but does nothing... nice! Solved by adding a load balancer with port forwarding.
Onto the real question. I am trying to use alexa-app as my framework from the following example:
...ANSWER
Answered 2017-Jul-28 at 21:33In the end I managed to connect my main app.js via epxress router to the getMessagingHandler function of the alexa-app. So in the app.js route your alexa webhook to the getMessagingHandler in your listener and then in the listener:
QUESTION
Hi I am trying to get a respond from Alexa requesting on a backend using requests. I am using Python with these example: https://github.com/alexa/skill-sample-python-fact. However my backend is NodeJS.
From my Lambda:
...ANSWER
Answered 2018-Jul-05 at 04:36I do not know what is the connection of this problem to my request. It is now working.
QUESTION
I wrote a simple Alexa skill. It uses "alexa-app" as dependency.
var alexa = require('alexa-app');
When I save and test my skill I get the following response
...ANSWER
Answered 2017-Feb-25 at 11:35No, you will need to include it in a zip along with any other files. It really isn't difficult to do though. You can use the AWS CLI to simplify this.
Here is a bash script that I use on my Mac for doing this:
QUESTION
Im a little confuse atm.
Is it possible to build a Alexa Smarthome Skill without hosting it on AWS.
For my last custom skill I used Alexa-App but this doesn't support the Smarthome-API from Amazon, as far as I know. Also I did not found any library that does support the Smarthome-API.
Maybe you can Help me find a lib, so I can host my Smart home-Skill on my own Server.
Pref language: JavaScript and Ruby
...ANSWER
Answered 2018-Mar-27 at 03:09Is it possible to build a Alexa Smarthome Skill without hosting it on AWS.
No, it is not -- not entirely, anyway.
Alexa supports hosting custom skills entirely externally. They call this "hosting a skill as a web service" -- that is, a web-accessible endpoint that Alexa can send requests to. However:
Web services can only be used for custom skills.
https://developer.amazon.com/docs/custom-skills/host-a-custom-skill-as-a-web-service.html
Smart Home Skills must be run in Lambda. Of course, the Lambda function for a Smart Home Skill can make is own external requests to the "device cloud" -- whatever that means to you, and which may involve servers of your own -- but this is done using either HTTPS request or requests using any other custom protocol you might use, either way, from inside the Lambda function that Alexa invokes.
Your skill code, which is hosted as a Lambda function receives and parses the directive, validating the authentication information. Your skill communicates with your systems, or device cloud, using communication channels you've defined to turn on the customer’s kitchen light. (emphasis added)
https://developer.amazon.com/docs/smarthome/understand-the-smart-home-skill-api.html
QUESTION
I have trying to build and looking for a framework for my web service end point and I came across two frameworks: Alexa-app: https://github.com/alexa-js/alexa-app Jovo: https://github.com/jovotech/jovo-framework-nodejs Can some one share the difference between these two frameworks?
...ANSWER
Answered 2018-Mar-09 at 12:44one of the founders here from Jovo. Both frameworks have their advantages, but the main difference is for which platforms you can build.
- Alexa-App has been around for quite a while and is a great community-maintained project, completely focused on building for Amazon Alexa (as the name suggests)
- Jovo currently supports to build apps for both Amazon Alexa and Google Assistant (Google Home) with one code-base, and offers a lot of tools around that, like local prototyping
I feel like the best way is to try them out both and see what you like better. If you want to give Jovo a try, take a look at our recent v1.0 launch announcement.
QUESTION
Specifically, is there an equivalent of the capability described here that exists in Alexa Skills Kit where you can send a Card in your Skill's response?
...ANSWER
Answered 2017-Apr-09 at 11:39Yes, Alexa supports displaying a card in the Alexa app as part of its response. How you do that depends on which Alexa framework or SDK you are using, but its not difficult at all. For example, I'm using the alexa-app framework, and I would just add something like this:
QUESTION
We are developing alexa skill using alexa-app, in one of our intent we are trying to fetch albums from facebook and on success/failure we want alexa to respond accordingly. But intent is not waiting for FB call to complete. Below is the code snippet we are using:
...ANSWER
Answered 2017-Oct-11 at 10:40Got it solved my myself:
instead of this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install alexa-app
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page