question

Kevin M avatar image
Kevin M asked

PHP - Laravel/Lumen composer package for writing AppKit apps

Hello all! I have been working on writing a number of sample applications for Alexa/AppKit/Echo, and decided to create an open source package to facilitate this - specifically for us with Laravel or Lumen, which if you are not familiar are popular/up-and-coming php frameworks. My package I'm currently called "alexa-app" (which I've found to be a popular name!), and you can read more about it on the github page: https://github.com/develpr/alexa-app You can also check out a video that gives brief walkthrough of some of the basic features here: https://www.youtube.com/watch?v=uhSAdadTqiE Some basic features include: 1. Making it super simple to route various types of requests from AppKit/Alexa within your application 2. Handling the security requirements Amazon has put forth in terms of cert validation, signature verification, timestamp tolerance, etc, etc. 3. Makes it easy to send properly formatted responses to AppKit using a nice, clean, easy to understand syntax (i.e. `return Alexa::say("Hello!")->withCard(new Card("Card title!", "", "This is a card!")->endSession();`) 4. Makes it easy to pull out various parts of the request, such as slot values, session values, etc. I'd call this a beta at this point, and would love any feedback, pull requests, feature requests, etc! Thanks for taking a look :)
alexa skills kitcommunity projects
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

justin avatar image
justin answered
Thanks for sharing, Kevin, and great documentation! I haven't worked with Laravel, but it looks like a great foundation for PHP-based Alexa development :)
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Kevin M avatar image
Kevin M answered
Hey thanks Justin, I really appreciate that! I'm hoping as other PHP developers start writing some apps for Alexa they find this useful.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Matt Farley avatar image
Matt Farley answered
Hi Kevin, Have you had a chance to test the new SHA2 certificate requirement coming July 14th in your PHP framework? I read your code and suspect you will encounter the same issue as me: https://forums.developer.amazon.com/forums/thread.jspa?threadID=5760&tstart=0
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Kevin M avatar image
Kevin M answered
Hey Matt! To be 100% honestly, I didn't actually realize anything was changing with the security/certificate requirements! That said, I'm guessing looking at your post that you are in fact correct, that I will have an issue. Was there a blog post or email update about this that I just missed? I'm going to try to take a look in the next day or two and see if I can figure out what's going on/what I need to change, and I'll keep an eye on the thread you posted also. Also, thanks for taking a look at my code, I appreciate it :) I'll update this post when I test/figure something out.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Matt Farley avatar image
Matt Farley answered
Hi Kevin! The announcement was made here: https://forums.developer.amazon.com/forums/thread.jspa?threadID=5764&tstart=0 Thanks for taking a look :) I'm sure I can leverage your findings, or we can jointly prove to Amazon that there's something wrong on their side :)
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Matt Farley avatar image
Matt Farley answered
Good news! I'm happy to report that Amazon has switched to SHA256 and my PHP code works just fine. There must have been an error/typo with the example CURL statement they asked us to test with.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Kevin M avatar image
Kevin M answered
Sadly, just seeing this Matt - so everything seems good then at the moment? I'm just getting back to this project, curious if anything else on this front has changed recently?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Matt Farley avatar image
Matt Farley answered
Hi Kevin, Nothing new -- the certificate validation is working as expected. Do note that we shamelessly "leveraged" some of your work here: https://forums.developer.amazon.com/forums/message.jspa?messageID=21838 Thank you! Matt
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.