alexa-app | A framework for Alexa apps using Node.js | Runtime Evironment library

 by   alexa-js JavaScript Version: 4.2.3 License: MIT

kandi X-RAY | alexa-app Summary

kandi X-RAY | alexa-app Summary

alexa-app is a JavaScript library typically used in Server, Runtime Evironment, Nodejs applications. alexa-app has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can install using 'npm i alexa-app' or download it from GitHub, npm.

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

            kandi-support Support

              alexa-app has a medium active ecosystem.
              It has 1024 star(s) with 221 fork(s). There are 55 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 61 open issues and 168 have been closed. On average issues are closed in 100 days. There are 21 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of alexa-app is 4.2.3

            kandi-Quality Quality

              alexa-app has 0 bugs and 0 code smells.

            kandi-Security Security

              alexa-app has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              alexa-app code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              alexa-app is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              alexa-app releases are not available. You will need to build from source code and install.
              Deployable package is available in npm.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed alexa-app and discovered the below as its top functions. This is intended to give you an instant insight into alexa-app implemented functionality, and help decide if they suit your requirements.
            • Constructor for an application .
            • Normalizes an api path
            Get all kandi verified functions for this library.

            alexa-app Key Features

            No Key Features are available at this moment for alexa-app.

            alexa-app Examples and Code Snippets

            No Code Snippets are available at this moment for alexa-app.

            Community Discussions

            QUESTION

            How to get the accesstoken from alexa after account linking with azure AD
            Asked 2020-Feb-03 at 11:07

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

            It 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.

            Source https://stackoverflow.com/questions/49998033

            QUESTION

            Run Amazon Alexa Skill locally instead of AWS Lambda (Javascript)
            Asked 2020-Jan-26 at 20:38

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

            Yes, 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.

            Source https://stackoverflow.com/questions/43621845

            QUESTION

            Trying to call another intent from a function in Amazon Alexa
            Asked 2019-Jul-30 at 08:26

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

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

            Source https://stackoverflow.com/questions/42247619

            QUESTION

            Amazon Alexa, alexa-app and middleware
            Asked 2018-Aug-19 at 19:50

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

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

            Source https://stackoverflow.com/questions/43192818

            QUESTION

            Alexa python get request returns null. Lambda is fine
            Asked 2018-Jul-05 at 09:04

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

            I do not know what is the connection of this problem to my request. It is now working.

            Source https://stackoverflow.com/questions/51176429

            QUESTION

            Deploy Alexa skill to AWS Lambda with "alexa-app" dependency
            Asked 2018-May-24 at 20:27

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

            No, 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:

            Source https://stackoverflow.com/questions/42450189

            QUESTION

            Alexa Smarthome-Skill without AWS
            Asked 2018-Mar-27 at 03:09

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

            Is 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

            Source https://stackoverflow.com/questions/49496045

            QUESTION

            How alexa-app framework and jovo framework are different?
            Asked 2018-Mar-09 at 12:44

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

            one 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.

            Source https://stackoverflow.com/questions/49104949

            QUESTION

            Actions on Google - can your response to the user send text or pictures to the Google Home app?
            Asked 2017-Oct-22 at 05:56

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

            Yes, 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:

            Source https://stackoverflow.com/questions/43302916

            QUESTION

            Alexa intent is not waiting for the api response
            Asked 2017-Oct-11 at 10:40

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

            Got it solved my myself:

            instead of this:

            Source https://stackoverflow.com/questions/46685856

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install alexa-app

            You can install using 'npm i alexa-app' or download it from GitHub, npm.

            Support

            With the addition of custom directives and support for display elements being selected, this library fully supports the Echo Show. Note that it is up to the developer to detect if the device can handle a display directive. If a display directive is returned to a non-visual device it will throw an error. One technique is to leverage the app.post call and remove any directives if the device does not support a UI. For example:. Please refer to Amazon's documentation for the list of supported template markup.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • npm

            npm i alexa-app

          • CLONE
          • HTTPS

            https://github.com/alexa-js/alexa-app.git

          • CLI

            gh repo clone alexa-js/alexa-app

          • sshUrl

            git@github.com:alexa-js/alexa-app.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link