ask-alexa-pykit icon indicating copy to clipboard operation
ask-alexa-pykit copied to clipboard

Request Object should validate applicationId

Open peterpanning opened this issue 8 years ago • 3 comments
trafficstars

Hey,

According to the Amazon guidelines for developing an Alexa skill, there should be some validation of Alexa requests within Lambda function codes.

https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/handling-requests-sent-by-alexa

The Request object seems like a good place to do that, since it's already doing some wrapping of Request JSONs anyways. I'm not sure how to go about raising an HTTP 400 Error without using some more robust framework, but I think this should at least raise an Assertion Error if the applicationIds don't line up

https://github.com/peterpanning/AlexaTransit/commit/2d7fdbcca77cd45514990be4fe478e417064cce6

Thoughts?

peterpanning avatar Jan 11 '17 00:01 peterpanning

Hi,

I implemented some code that does this and submitted a pull request.

https://github.com/anjishnu/ask-alexa-pykit/pull/32

fernandoaguilar avatar Jan 16 '17 19:01 fernandoaguilar

Thanks for this guys - I'm going to look at the PR soon

anjishnu avatar Feb 14 '17 03:02 anjishnu

btw just a note, I submitted an Alexa app with this app id verification code and passed Amazons certification process.

fernandoaguilar avatar Feb 14 '17 21:02 fernandoaguilar