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.6k↓92.3%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 today

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 81% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity42

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

3868d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/220535?v=4)[Mathias Hansen](/maintainers/MiniCodeMonkey)[@MiniCodeMonkey](https://github.com/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

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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