To enable the skill in the Alexa app in the Skills\Developer tab to use on your mobile | Alexa device
Click in use this template button and clone your template project
Open Alexa console in https://developer.amazon.com/alexa/console/ask and follow the steps
- Create Skill
- Choose a model to add to your skill:
use Custom - Select
Alexa-hosted (Node.js) - Click
Create Skill - Select
start from Scratch - Click
Continue with Template
Copy .env.example to .env and change the values according to your needs.
ALEXA_SKILL_UUID="00000000-0000-0000-0000-000000000000"
# As in the image belowchmod 774 ./start.sh ./build.sh ./deploy.sh
sh ./start.sh
# Fill folder with name `dist`add in skill-package/interactionModels/custom/<YOUR_LANG>.json this intent
after block HelloWorldIntent
{
"name": "GithubStarsIntent",
"slots": [],
"samples": [
"brilha brilha",
"my stars",
"minhas estrelas"
]
},First install dependencies with the following command
yarn install
# or
npm installafter start the project, you can commit the initial project with the following command
git add .
git commit -m "feat(Init): :tada: initial commit project start"
git pushTo build the project, you can use the following command
if you change files, you need to run
yarn buildandyarn debugagain
yarn build
yarn debugRun this request and test the response, you can change the Intent name and the Slot name
curl --location --request GET 'http://localhost:8035' \
--header 'Content-Type: application/json' \
--data-raw '{
"version": "1.0",
"session": {
"new": false,
"sessionId": "amzn1.echo-api.session.4edcfe44-df87-11ec-9d64-0242ac120002",
"application": {
"applicationId": "amzn1.ask.skill.4edcfe44-df87-11ec-9d64-0242ac120002"
},
"attributes": {},
"user": {
"userId": "amzn1.ask.account."
}
},
"context": {
"Viewports": [
{
"type": "APL",
"id": "main",
"shape": "RECTANGLE",
"dpi": 213,
"presentationType": "STANDARD",
"canRotate": false,
"configuration": {
"current": {
"mode": "HUB",
"video": {
"codecs": [
"H_264_42",
"H_264_41"
]
},
"size": {
"type": "DISCRETE",
"pixelWidth": 1280,
"pixelHeight": 800
}
}
}
}
],
"Viewport": {
"experiences": [
{
"arcMinuteWidth": 346,
"arcMinuteHeight": 216,
"canRotate": false,
"canResize": false
}
],
"mode": "HUB",
"shape": "RECTANGLE",
"pixelWidth": 1280,
"pixelHeight": 800,
"dpi": 213,
"currentPixelWidth": 1280,
"currentPixelHeight": 800,
"touch": [
"SINGLE"
],
"video": {
"codecs": [
"H_264_42",
"H_264_41"
]
}
},
"Extensions": {
"available": {
"aplext:backstack:10": {}
}
},
"System": {
"application": {
"applicationId": "amzn1.ask.skill.4edcfe44-df87-11ec-9d64-0242ac120002"
},
"user": {
"userId": "amzn1.ask.account."
},
"device": {
"deviceId": "amzn1.ask.device.",
"supportedInterfaces": {}
},
"apiEndpoint": "https://api.amazonalexa.com",
"apiAccessToken": ""
}
},
"request": {
"type": "IntentRequest",
"requestId": "amzn1.echo-api.request.4edcfe44-df87-11ec-9d64-0242ac120002",
"locale": "pt-BR",
"timestamp": "2022-05-29T19:29:21Z",
"intent": {
"name": "GithubStarsIntent",
"confirmationStatus": "NONE"
}
}
}'To prepare to deploy your Alexa application only run
sh ./deploy.sh


