PHPackages                             minicodemonkey/amazon-alexa-php - 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. [API Development](/categories/api)
4. /
5. minicodemonkey/amazon-alexa-php

ActiveLibrary[API Development](/categories/api)

minicodemonkey/amazon-alexa-php
===============================

Amazon Alexa interface for PHP

0.1.5(10y ago)9728.5k↓65%70[4 issues](https://github.com/MiniCodeMonkey/amazon-alexa-php/issues)1MITPHPPHP &gt;=5.4.0

Since Aug 26Pushed 4y ago9 watchersCompare

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

READMEChangelogDependencies (1)Versions (9)Used By (1)

Amazon Alexa PHP Library
========================

[](#amazon-alexa-php-library)

This library provides provides a convient interface for developing Amazon Alexa Skills for your PHP app.

Usage
-----

[](#usage)

Install via composer: `composer require minicodemonkey/amazon-alexa-php`.

### Requests

[](#requests)

When Amazon Alexa triggers your skill, a HTTP request will be sent to the URL you specified for your app.

You can parse the `JSON` body of the request like so:

```
$jsonDataAsArray = $request->json()->all(); // This is how you would retrieve this with Laravel
$alexaRequest = \Alexa\Request\Request::fromData($jsonDataAsArray);
```

You can determine the type of the request with `instanceof`, e.g.:

```
if ($alexaRequest instanceof IntentRequest) {
	// Handle intent here
}
```

### Responses

[](#responses)

You can build several Alexa responses with the `Response` class. You can optionally set cards or a reprompt, too.

Here's a few examples.

#### Simple text response

[](#simple-text-response)

```
$response = new \Alexa\Response\Response;
$response->respond('I\'m your response message');
```

#### With reprompt

[](#with-reprompt)

```
$response = new \Alexa\Response\Response;
$response->reprompt('What is your favourite color?');
```

#### Cards

[](#cards)

For detailled informations on cards check out the following link:

##### SingleCard

[](#singlecard)

```
$response = new \Alexa\Response\Response;
$response->respond('Cooool. I\'ll lower the temperature a bit for you!')
	->withCard('Temperature decreased by 2 degrees');
```

##### StandardCard with images

[](#standardcard-with-images)

You can also show images within your card

Please note some notes on image sizing and hosting: [https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/providing-home-cards-for-the-amazon-alexa-app#image\_size](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/providing-home-cards-for-the-amazon-alexa-app#image_size)

```
$response = new \Alexa\Response\Response;
$response->respond('Cooool. I\'ll lower the temperature a bit and show you an image!')
	->withImageCardCard('My title', 'My caption text for the image...', 'https://url.to/small-image.jpg', 'https://url.to/large-image.jpg');
```

##### LinkAccountCard

[](#linkaccountcard)

The LinkAccountCard is used for skills with enabled account linking and will show a link to your configured account linking url. As title, text etc. are set automatically there is no possibility to set random text.

```
$response = new \Alexa\Response\Response;
$response->respond('To link the skill with your account, click the linkAccount shown in your alexa app.')
	->withLinkAccountCard();
```

#### Output the response

[](#output-the-response)

To output the response, simply use the `->render()` function, e.g. in Laravel you would create the response like so:

```
return response()->json($response->render());
```

In vanilla PHP:

```
header('Content-Type: application/json');
echo json_encode($response->render());
exit;
```

TODO
----

[](#todo)

- Verify request timestamp integrity automatically

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity43

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~13 days

Total

8

Last Release

3823d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9ed84123c7f95e96700d9b59e7a3116f3129860e5e58d2b1c502e9cb47b46b8e?d=identicon)[MiniCodeMonkey](/maintainers/MiniCodeMonkey)

---

Top Contributors

[![MiniCodeMonkey](https://avatars.githubusercontent.com/u/220535?v=4)](https://github.com/MiniCodeMonkey "MiniCodeMonkey (10 commits)")[![maegnes](https://avatars.githubusercontent.com/u/5019381?v=4)](https://github.com/maegnes "maegnes (4 commits)")[![mskarupianski](https://avatars.githubusercontent.com/u/973723?v=4)](https://github.com/mskarupianski "mskarupianski (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/minicodemonkey-amazon-alexa-php/health.svg)

```
[![Health](https://phpackages.com/badges/minicodemonkey-amazon-alexa-php/health.svg)](https://phpackages.com/packages/minicodemonkey-amazon-alexa-php)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
