alexa-skills-kitalexa-voice-servicejovo-framework

Alexa skill not asking for permission (notification) when enabling the skill via voice


The skill in question asks for one permission when enabling in Web or app (Outbound Notification). But, when implemented Skill Enabled Event it's not asking user to give notification permission or not. Skill enablement works itself but permission is by default No. How to make alexa to ask for permission when enabling via voice?

Can Alexa prompt them via voice to enable the outbound notification?

skill.json

{
"manifest": {
    "publishingInformation": {
        "locales": {
            "en-US": {
                "summary": "test skill summary",
                "examplePhrases": [
                    "Alexa, launch test skill",
                    "Alexa, open test skill",
                    "Alexa, start test skill"
                ],
                "keywords": [
                    "test skill"
                ],
                "name": "test skill",
                "description": "test skill Description",
                "smallIconUri": "",
                "largeIconUri": "",
                "updatesDescription": ""
            }
        },
        "isAvailableWorldwide": true,
        "testingInstructions": "n/a",
        "category": "EVENT_FINDERS",
        "distributionCountries": [],
        "automaticDistribution": {
            "isActive": false
        }
    },
    "apis": {
        "custom": {
            "endpoint": {
                "uri": "arn:aws:lambda:us-east-1:"
            },
            "interfaces": []
        }
    },
    "manifestVersion": "1.0",
    "privacyAndCompliance": {
        "allowsPurchases": false,
        "locales": {
            "en-US": {
                "privacyPolicyUrl": "",
                "termsOfUseUrl": ""
            }
        },
        "isExportCompliant": true,
        "containsAds": false,
        "isChildDirected": false,
        "usesPersonalInfo": false
    },
    "events": {
        "endpoint": {
            "uri": "arn:aws:lambda:us-east-1:"
        },
        "publications": [
            {
                "eventName": "AMAZON.MessageAlert.Activated"
            },
            {
                "eventName": "AMAZON.MediaContent.Available"
            }
        ],
        "regions": {
            "NA": {
                "endpoint": {
                    "uri": "arn:aws:lambda:us-east-1:",
                    "sslCertificateType": "Trusted"
                }
            }
        },
        "subscriptions": [
            {
                "eventName": "SKILL_PROACTIVE_SUBSCRIPTION_CHANGED"
            },
            {
                "eventName": "SKILL_ENABLED"
            },
            {
                "eventName": "SKILL_DISABLED"
            },
            {
                "eventName": "SKILL_PERMISSION_ACCEPTED"
            },
            {
                "eventName": "SKILL_PERMISSION_CHANGED"
            },
            {
                "eventName": "SKILL_ACCOUNT_LINKED"
            }
        ]
    },
    "permissions": [
        {
            "name": "alexa::devices:all:notifications:write"
        }
    ]
}

}

Thank you for the help


Solution

  • There may be a different way, but once you are in the skill I believe you will need to send an ask for permissions card. As I understand it the idea is to make sure that Amazon is involved as a third party permissions granter. This will pop a permissions request in the Alexa app on the users phone. This added layer of security just makes sure the customer saw exactly what permissions they were granting.

    You can do this a few different ways in your skill. You could check the first time that the user connects and keep track of that first connection in a persistent customer data layer. Or you could just check if the user has permission when you go to use that part of the skill. If they don't respond telling the customer you sent them a card to grant permissions.

    Here is more info on permission cards: https://developer.amazon.com/en-US/docs/alexa/custom-skills/request-customer-contact-information-for-use-in-your-skill.html#permissions-card-for-requesting-customer-consent