omissis/php-ask-sdk

This package is abandoned and no longer maintained. No replacement package was suggested.

PHP SDK for Amazon Alexa Skills Kit

dev-master 2019-06-07 07:24 UTC

This package is auto-updated.

Last update: 2023-07-08 02:07:01 UTC


README

This repository contains an (experimental) API SDK for Alexa's Skill Management API written in PHP.

Local Testing

In order to test it locally, you need to have an account on the Alexa Developer Console as well as a configured skill.

Once that's in place, run composer install; then create a .env file in the root of this repo and fill in the skill id.

Last, run make env-renew-token: that should open a browser and write a token in your env file once you authenticate.

You are now ready to try the examples by running php examples/get_skill.php and start tinkering with your skill.

Authentication

Quite unfortunately the only supported OAuth2 grant type is "authorization code", which forces the user to authenticate using a browser. In order to make things a bit simpler, there are two helper make targets that automate some parts of the process.

Obtain an access token

make token

Write a new access token in the .env file

make env-renew-token

Notes

Tokens are stored in ~/.ask/cli_config