{"id":15524345,"url":"https://github.com/codeforequity-at/botium-connector-alexa-smapi","last_synced_at":"2025-04-23T07:31:31.069Z","repository":{"id":67345021,"uuid":"133498763","full_name":"codeforequity-at/botium-connector-alexa-smapi","owner":"codeforequity-at","description":"Botium Connector for Amazon Alexa Skills API","archived":false,"fork":false,"pushed_at":"2020-09-28T12:30:42.000Z","size":244,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-29T22:41:19.046Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeforequity-at.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-15T10:17:01.000Z","updated_at":"2020-09-28T12:30:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0e267e1-d7b0-4d89-98de-f46bf10a081d","html_url":"https://github.com/codeforequity-at/botium-connector-alexa-smapi","commit_stats":{"total_commits":59,"total_committers":7,"mean_commits":8.428571428571429,"dds":0.6949152542372881,"last_synced_commit":"8513ea4c89a42a623a79642e8ced591af7574598"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforequity-at%2Fbotium-connector-alexa-smapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforequity-at%2Fbotium-connector-alexa-smapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforequity-at%2Fbotium-connector-alexa-smapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforequity-at%2Fbotium-connector-alexa-smapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeforequity-at","download_url":"https://codeload.github.com/codeforequity-at/botium-connector-alexa-smapi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250391048,"owners_count":21422832,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T10:51:02.878Z","updated_at":"2025-04-23T07:31:31.044Z","avatar_url":"https://github.com/codeforequity-at.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Botium Connector for Amazon Alexa Skills API\n\n[![NPM](https://nodei.co/npm/botium-connector-alexa-smapi.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/botium-connector-alexa-smapi/)\n\n[![Codeship Status for codeforequity-at/botium-connector-alexa-smapi](https://app.codeship.com/projects/e0750720-3c10-0136-1ab8-1230355a00f9/status?branch=master)](https://app.codeship.com/projects/290458)\n[![npm version](https://badge.fury.io/js/botium-connector-alexa-smapi.svg)](https://badge.fury.io/js/botium-connector-alexa-smapi)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg)]()\n\nThis is a [Botium](https://github.com/codeforequity-at/botium-core) connector for testing your Amazon Alexa Skills with the Skills Management API.\n\n__Did you read the [Botium in a Nutshell](https://medium.com/@floriantreml/botium-in-a-nutshell-part-1-overview-f8d0ceaf8fb4) articles ? Be warned, without prior knowledge of Botium you won't be able to properly use this library!__\n\n## How it works ?\nThe [Alexa Skills Management API](https://developer.amazon.com/de/alexa-skills-kit/smapi) enables Botium to talk to your Alexa skill.\n\nIt can be used as any other Botium connector with all Botium Stack components:\n* [Botium CLI](https://github.com/codeforequity-at/botium-cli/)\n* [Botium Bindings](https://github.com/codeforequity-at/botium-bindings/)\n* [Botium Box](https://www.botium.at)\n\n## Requirements\n\n* __Node.js and NPM__\n* an __Alexa Skill__, and user account with development rights\n* a __project directory__ on your workstation to hold test cases and Botium configuration\n\n## Install Botium and Amazon Alexa Skills API Connector\n\nWhen using __Botium CLI__:\n\n```\n\u003e npm install -g botium-cli\n\u003e npm install -g botium-connector-alexa-smapi\n\u003e botium-cli init\n\u003e botium-cli run\n```\n\nWhen using __Botium Bindings__:\n\n```\n\u003e npm install -g botium-bindings\n\u003e npm install -g botium-connector-alexa-smapi\n\u003e botium-bindings init mocha\n\u003e npm install \u0026\u0026 npm run mocha\n```\n\nWhen using __Botium Box__:\n\n_Already integrated into Botium Box, no setup required_\n\n## Connecting Amazon Alexa Skills API to Botium\n\nThis connector includes a CLI wizard to initialize the _botium.json_ file holding your connection credentials.\n\n_This wizard is part of Botium CLI as well._\n\n    \u003e npx botium-connector-alexa-smapi-cli init\n\nThis wizard will guide you through the Botium Connector setup. Please follow the instructions. It involves Copy\u0026Paste from a web browser to this terminal window.\n\n### Adapt botium.json\n\nOpen the file _botium.json_ in your working directory and add other settings if required.\n\n```\n{\n  \"botium\": {\n    \"Capabilities\": {\n      \"PROJECTNAME\": \"\u003cwhatever\u003e\",\n      \"CONTAINERMODE\": \"alexa-smapi\",\n      \"ALEXA_SMAPI_API\": \"invocation\",\n      \"ALEXA_SMAPI_SKILLID\": \"...\"\n    }\n  }\n}\n```\n\nBotium setup is ready, you can begin to write your [BotiumScript](https://github.com/codeforequity-at/botium-core/wiki/Botium-Scripting) files.\n\n## Extracting Test Cases from the Alexa Interaction Model \n\nThis connector provides a CLI interface for importing the Interaction Model from your skill and convert it to BotiumScript.\n\n* Intents and Utterances are converted to BotiumScript utterances files\n* Slots are filled with meaningful samples if possible\n** You can hand over the samples to use with the _--slotsamples_ switch\n** For default slot types, samples are loaded automatically from the [official documentation](https://developer.amazon.com/de/docs/custom-skills/slot-type-reference.html)\n** For custom slot types, the samples from the interaction model are used\n\nYou can either run the CLI with botium-cli (it is integrated there), or directly from this connector (see samples/cli directory for some examples):\n\n    \u003e npx botium-connector-alexa-smapi-cli import --interactionmodel entityresolutionquizdemo.json\n\n_Please note that a botium-core installation is required_\n\nFor getting help on the available CLI options and switches, run:\n\n    \u003e npx botium-connector-alexa-smapi-cli import --help\n\n## Supported Capabilities\n\n### CONTAINERMODE: \"alexa-smapi\"\n\nSet the CONTAINERMODE capability to alexa-smapi\n\n### ALEXA_SMAPI_API\n_default: \"simulation\"_\n\nEither \"simulation\" or \"invocation\" to use the respective [Skill Management API](https://developer.amazon.com/de/docs/smapi/skill-testing-operations.html)\n* __Skill Simulation API__ handles plain text input (including intent resolution)\n* __Skill Invocation API__ handles structured input (intents and slots, no intent resolution done) and is therefore harder to use than the Simulation API\n\nSee the [samples](samples) directory for configuration and conversation samples.\n\n### ALEXA_SMAPI_SKILLID\n\nThe Alexa Skill ID\n\n### ALEXA_SMAPI_LOCALE\n_default: \"en-US\"_\n\nThe locale used for the simulation / invocation - list of valid locales see [here](https://developer.amazon.com/de/docs/smapi/skill-simulation-api.html#request-attributes-definition)\n\n### ALEXA_SMAPI_REFRESHTOKEN\n\nThe long-living refresh token. Typically, the refresh token is created with the initialization wizard (see above).\n\n### ALEXA_SMAPI_BASE_URL\n_default: \"https://api.amazonalexa.com\"_\n\nSkill Management API Url\n\n### ALEXA_SMAPI_CLIENTID and ALEXA_SMAPI_CLIENTSECRET\nFrom your Amazon Security Profile\n\n### ALEXA_SMAPI_VENDORID\nAmazon vendor id\n\n### ALEXA_SMAPI_ENDPOINTREGION\n_default: \"default\"_\n\nThe AWS Endpoint the Skill is linked to (only required for Skill Invocation API) - see [here](https://developer.amazon.com/de/docs/smapi/skill-invocation-api.html#request-attributes-definition)\n\n### ALEXA_SMAPI_INVOCATION_TEXT_INTENT and ALEXA_SMAPI_INVOCATION_TEXT_SLOT\n\nWhen using the Invocation API, tell Botium to use a special intent and a special slot to hand over the input text (intent resolution is done by Skill itself)\n\n### ALEXA_SMAPI_INVOCATION_REQUEST_TEMPLATE\n_default: the file invocation-request-template.json in this repository_\n\nWhen using the Invocation API, tell Botium to use a special template for the invocation request (JSON formatted).\n\n### ALEXA_SMAPI_AUDIO_CAPABILITY and ALEXA_SMAPI_DISPLAY_CAPABILITY\n_default: false_\n\nThese will add Audio and Display capabilities when set to true to the invocation request sent to the Skill Management API.\n\n### ALEXA_SMAPI_REFRESH_USER_ID\n_default: false_\n\n**This only works with the invocation API**\n\nThis will generate a new userId to send within each different convo.txt file. By default the userId is `botium-core-test-user` and when\ngenerated the user will be `botium-core-test-user-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` with a randomly generated UUID.\n\n### ALEXA_SMAPI_KEEP_AUDIO_PLAYER_STATE\n_default: false_\n\n**This only works with the invocation API**\n\nIf your skill contains audio player responses this will track the changes to the audio player such as the `token` and the `playerActivity`\nand allow you to use intents such as `AudioPlayer.PlaybackNearlyFinished` and other `AudioPlayer` intents and get the state back on the response.\n\n### ALEXA_SMAPI_SIMULATION_PHRASE\n_default: empty_\n\n**This only works with the simulation API**\n\nPrepend this phrase to all user utterances\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeforequity-at%2Fbotium-connector-alexa-smapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeforequity-at%2Fbotium-connector-alexa-smapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeforequity-at%2Fbotium-connector-alexa-smapi/lists"}