PHPackages                             pangodream/alexa-skill - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. pangodream/alexa-skill

ActiveLibrary

pangodream/alexa-skill
======================

Alexa Skill to SelfHosted Webservice library

012PHP

Since Jan 27Pushed 7y agoCompare

[ Source](https://github.com/pangodream/alexa-skill)[ Packagist](https://packagist.org/packages/pangodream/alexa-skill)[ RSS](/packages/pangodream-alexa-skill/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

alexa-skill
===========

[](#alexa-skill)

Alexa Skill to Self hosted webservice implementation for PHP

This component allows you to parse and validate the incoming requests from any Alexa skill you create. The parsing process covers the basic funcionality to know when an Intent has been invocated and how to reply with basic instructions to Alexa. The request validation checks all these Amazon requirements (except the last one):

- Request timestamp: 150 secs margin
- CertChain URL (protocol, port, host and URI)
- CertChain validation (Subject Altern Name and FromTime-ToTime)
- Signature decryption with Cert PK to match SHA1 hash of request body
- CertChain Root Certification Authority valid to Amazon (still pending)

Though last requisite is still pending, **Functional testing** under **Certification** tab obtains **"Zero errors found."**.

Functional testing, at least in my case, has made 7 requests and the component resolved succesfully all of them:

- Request well formed --&gt; Response OK
- Request well formed --&gt; Response OK
- Request well formed --&gt; Response OK
- CertChain not available in specified URL --&gt; Response 400 bad request
- No signature --&gt; Response 400 bad request
- CertChain not available in specified URL --&gt; Response 400 bad request
- Signature doesn't match calculated hash SHA1 --&gt; Response 400 bad request

All these requirements are described at [Host a Custom Skill as a Web Service](https://developer.amazon.com/es/docs/custom-skills/host-a-custom-skill-as-a-web-service.html#verifying-that-the-request-was-sent-by-alexa)

How to
======

[](#how-to)

How to use this component

Composer Installation
---------------------

[](#composer-installation)

```
composer require pangodream/alexa-skill
```

Usage example in Laravel
------------------------

[](#usage-example-in-laravel)

This is an example made in Laravel, though the component has no external dependencies (appart from PHP 7.0)

Let's create an API entry point in api.php file.

**api.php**

```
