echo-api | First attempt at an API for Amazon Echo | AWS library
kandi X-RAY | echo-api Summary
kandi X-RAY | echo-api Summary
First attempt at an API for Amazon Echo.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of echo-api
echo-api Key Features
echo-api Examples and Code Snippets
Community Discussions
Trending Discussions on echo-api
QUESTION
I am trying to create a skill in Alexa dev console which will respond to a command by returning information found from API queries. My other commands work, such as "help", status of elevator xxx, etc. Just this one command doesn't return correct results.
The expected outcome:
Me: what is going on
.
Alexa: Greetings. There are currently XXX elevators deployed in the XXX buildings of your XXX customers Currently, XXX elevators are not in Running Status and are being serviced XXX Batteries are deployed across XXX cities On another note you currently have XXX quotes awaiting processing You also have XXX leads in your contact requests
.
Actual result:
Me: what is going on
.
Alexa:Sorry, I can't understand the command. Please say again.
JSON Input 1 from the command:
...ANSWER
Answered 2022-Jan-14 at 22:01Add AMAZON.FallbackIntent in your interaction model.
"Sorry, I can't understand the command. Please say again. " This speech output should be sent when AMAZON.FallbackIntent is requested, not on an error.
I don't know how javascript works, but I think there is some error in your code which triggers errorHandler which then gives that output.
QUESTION
I've been stuck with hosting an alexa skill webserver on my localhost! Everything's correct from the Intents I've made, the url works, and it does request the intent I ask it for, but Alexa constantly keeps saying "There was a problem with the requested skill's response"
...ANSWER
Answered 2021-Dec-07 at 01:20After hours of researching and github searches, this is the github repo you need to look at if you are willing to host your skill locally using REST API
QUESTION
I am currently building an Alexa Skill using my own .NET-Backend, which should return an AlexaTextList with dynamic contents from my service. The request by Alexa looks the following:
...ANSWER
Answered 2021-Feb-08 at 09:20I figured out what is the problem. I was using different HTTP 2xx-Status Codes, while Alexa only accepts 200 (https://developer.amazon.com/en-US/docs/alexa/custom-skills/request-and-response-json-reference.html#http-header-1).
My problem therefore was not related to my request data or any settings in the developer console, but my HTTP-Header. It is a little confusing for me, because I was actually returning success status codes that could have been accepted, but apparently Alexa has strict requirements for that. I was not aware of this. Thanks to everyone, who was trying to help me out here and was validating my JSON-response.
QUESTION
I'm trying to work through the steps listed here for an Alexa Skill I'm developing in Java.
I'm getting a request from Alexa which is a POST. Two of the headers are the signing certificate chain url and the signature.
Amazon SHA1 hashes then signs the entire body of the Alexa request with an X509 key, and then base64 encodes the signed body. This is the "signature." The signing certificate chain is the url where I can GET the X509 certificate chain that contains their public key.
What I need to do is base64 decode the signature, then use the X509 public key to decrypt the signature. This leaves me with a SHA1 hashed request body. Then I need to SHA1 hash the body of the request myself and compare the two.
I validate the certificate chain. I extract the public key. I hash the body of the POST and produce a derived hash value (its SHA1withRSA). I base64 decode the "signature" then decrypt it with the public key to get the asserted hash value.
I've not been able to produce a derived hash value that matches the asserted hash value. This is where I'm stuck and I can't understand what I'm doing wrong. I don't really understand this encryption stuff very well so perhaps I'm missing something super simple.
Step 8 from the link above is where I'm stuck.
First, I borrowed the code from the alexa SDK here. The problem is this code doesn't seem to work:
...ANSWER
Answered 2021-Jan-14 at 05:28First, digital signature is NOT encryption with the privatekey; Amazon is deceiving you there, see https://security.stackexchange.com/questions/159282/can-openssl-decrypt-the-encrypted-signature-in-an-amazon-alexa-request-to-a-web which was basically the same question except without Java. And Java crypto exacerbates this because it was designed in the 1990s when this mistake was still fairly common, and as a result the Cipher
object which is intended to be for encryption and decryption accepts the 'backwards' use of RSA keys and internally changes them to the operations used in the Signature
scheme 'NoneWithRSA' (which might be considered a pseudo-scheme since it doesn't really match PKCS1).
Expanding on that point, the difference between your 'decrypted' (more properly, recovered) value and a simple hash is that the PKCS1v1 signature scheme used here, now retronymed RSASSA-PKCS1-v1_5 in PKCS1v2, actually has four steps:
#1 hash the data
#2 encode the hash value and algorithm in a DigestInfo ASN.1 structure encoded in DER, which amounts to adding a fixed prefix per algorithm
#3-5 prepend padding of the form 00 01 FF...(at least 8) 00
(8.2.1#2) treating the result as a number m, apply RSASP1 which does m ^ d mod n (or for verify 8.2.2#2 apply RSAVP1 which does s ^ e mod n; this is stated as before the three padding steps above but actually can just as well be after)
The backwards-Cipher operation performs, or reverses, only the third and fourth steps above; you have added the first step, but not the second, so your 'decrypted' value is actually a DigestInfo structure that contains some metadata, the OID for the SHA1 algorithm, and the hash value that should correspond to the data.
This failure to create or remove the DigestInfo structure is also a very common mistake and problem; see my list at https://crypto.stackexchange.com/questions/87006/why-is-data-signed-with-sha256-rsa-pkcs-and-digest-signed-with-rsa-pkcs-differen/#87022 .
But it doesn't match. The hash value embedded in the recovered DigestInfo is not the same as the hash value you computed on your data (and I also get). This strongly suggests some change between your data and the data the Amazon signed, but I have no idea what; certainly your data looks superficially like an Alexa request should. Sorry :-)
QUESTION
I receive the error "There was a problem with the requested skill's response" which is arising from the following class:
...ANSWER
Answered 2020-Sep-07 at 20:41Resolved by adding the following lines:
QUESTION
I am using an AWS lambda function to serve my NodeJS codebase for an Alexa Skill.
The skill makes external API calls to a custom API as well as the Amazon GameOn API, it also uses URL's which serve audio files and images from an S3 Bucket.
The issue I am having is intermittent, and is affecting about 20% of users. At random points of the skill, the user request will produce an invalid response from the skill, with the following error:
...ANSWER
Answered 2020-May-17 at 13:29QUESTION
i know, this topic was discussed very often. But these posts are either very old, or do not fix my problem. So i try it with opening a new (other) one. I recently started making Alexa Skills. So now i managed to set up my AWS Lambda function with the help of (an also old) Tutorial. Everything worked fine in the first step. So now i want to sent a GET Request to a website, just to get the status code. In the next step, Alexa should tell me this code- but thats a diffrent story. So i tried to get the request done with many different code snippets- but nothing worked. After reading various posts, i understand that the code runs faster then the request can be executed. So the answer of the request does never show up in the logs. Which means, i cannot make use of it.
This is my current code:
...ANSWER
Answered 2020-Feb-17 at 11:03In your code exports.handler = async function(event) {} is the cause
QUESTION
I have created one Alexa skill which I want to communicate with my chatbot. When I am asking question to Alexa, in request only intent name is coming.But I want the utterance text also. Is it possible to get that utterance?
"request": {
"type": "IntentRequest",
"requestId": "amzn1.echo-api.request.480ebab4-cd67-418e-b67f-eb8a00b74020",
"timestamp": "2020-02-13T06:55:52Z",
"locale": "en-US",
"intent": {
"name": "ask_utterance",
"confirmationStatus": "NONE"
}
}
This is the request.I am correctly getting intent name but i want utterance text which will then I will send to my chatbot. Is it possible to do that?
ANSWER
Answered 2020-Feb-13 at 08:06No, you can't (as for now) have the complete utterance.
The only thing that is near to a complete utterance is AMAZON.SearchQuery slot. Otherwise, you will obtain only slot values.
QUESTION
For some reason I am unable to execute a few of my intents in my Alexa skill. Here is the flow of discussion as it is.
- 'open my passwords'
Alexa: what is your passphrase?
- 'my passphrase is test'
Alexa: You're in.
- 'what is my wifi password?'
Alexa: There was a problem with the requested skill's response.
Here is a screenshot of the conversation.
And here are my acceptable utterances, where type
is of slot type AMAZON.SearchQuery
.
At this point I am just trying to reach GetPasswordHandler
and have her say 'hello world'. But I am unable to log or reach this intent. I was reaching it at one point and was able to execute this intent but for some reason it's not working now and I just get the generic There was a problem with the requested skill's response
error.
I tried moving around the intents because I thought maybe the order in which they were listed was the problem but I have yet to find an order that works. I also tried using CloudWatch to log whatever the issue might be but I am pretty new to it and I might be using it incorrectly because I feel like the information isn't very helpful aside from the fact that alarms. All I have been able to find out from the JSON Input in the test panel is that the response was invalid. Here is what the error looks like in the input JSON for the SessionEndRequest
.
ANSWER
Answered 2020-Feb-06 at 19:41I ended up just rewriting the intents and they work now. I'm not sure exactly what was wrong but I noticed that when I added the new intents they were added to the bottom of my skill manifest as opposed to the previous order. I am not 100% sure that this was the issue but it is the only thing I noticed changing when I remade the intentions.
QUESTION
after setting up everything i am getting this error in while testing the skill in Alexa developer There was a problem with the requested skill's response then i put that json response in lambda test and i got the following
...ANSWER
Answered 2020-Jan-06 at 21:17The easiest way to debug this type of coding error is to use 'local debugging' so that you can step through your code in an IDE. This will be far more convenient that using plain stack traces in the ASK Response or by looking through CloudWatch logs.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install echo-api
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