alexa / ask-cli

Alexa Skills Kit Command Line Interface

Home Page:https://developer.amazon.com/en-US/docs/alexa/smapi/ask-cli-intro.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enforce/Warn about Account Linking for Skills using the householdList API

jschiefner opened this issue · comments

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request 
[ ] Other... Please describe: 

For Skills that use the householdList API it is now necessary to implement Account Linking (see https://amazon.developer.forums.answerhub.com/questions/247690/self-hosted-skill-no-longer-receiving-items-create.html)

When creating a new skill this is not enforced by the cli and no warning is issued whatsoever that account linking is required for this feature. Here is the necessary parts from my skill.json that make the list api work:

{
  "apis": {
      "householdList": {}
  },
  "events": {
    "endpoint": {
      "uri": "**************************",
      "sslCertificateType": "********"
    },
    "subscriptions": [
      {
        "eventName": "ITEMS_CREATED"
      },
      {
        "eventName": "ITEMS_UPDATED"
      },
      {
        "eventName": "ITEMS_DELETED"
      }
    ]
  },
  "permissions": [
    {
      "name": "alexa::household:lists:read"
    },
    {
      "name": "alexa::household:lists:write"
    }
  ],
}

Expected Behavior

When running ask deploy and the skill has no account linking implemented, the user should be warned that without account linking implemented, the list api and events will not work as expected.

Current Behavior

Running ask deploy works without any warnings related to account linking.

Steps to Reproduce (for bugs)

Create a new skill with ask new, add the requirements to the skill.json as specified above, try to receive events on the specified endpoints. It will not work because Account Linking is not implemented.

Possible Solution

Warn the user when deploying a skill that those features need account linking.

Your Environment and Context

  • ask-cli version: 2.28.0
  • Operating System and version: Mac OS 13.0.1
  • Node.js version used for development: v19.8.1
  • NPM version used for development: 9.5.1