Ask Multiple Permissions in one go

amazon-alexa

#1

Hi,

Is it possible to ask multiple permissions all in one card?

I’m translating a voice app from native ask sdk to Jovo, In ask sdk I can do this:

                return handlerInput.responseBuilder
                    .speak(speechText)
                    .withAskForPermissionsConsentCard(PERMISSIONS)
                    .getResponse(); 

Where PERMISSIONS = [‘alexa::profile:name:read’, ‘alexa::profile:email:read’, ‘alexa::profile:mobile_number:read’, ‘read::alexa:device:all:address’];

Is it possible to port that code in Jovo?

Thanks,
Salvo


#2

Hey @Salvatore_Vac1

Welcome to the Jovo Community.

Yes, it is possible:

const { AskForPermissionConsentCard } = require('jovo-platform-alexa');
///
this.$alexaSkill.showCard(
          new AskForPermissionsConsentCard().setPermissions(['alexa::alerts:reminders:skill:readwrite'])
        );

Looks too complicated to me :smiley: I added the following helper method. It will be available with the next release:

this.$alexaSkill.showAskForPermissionsCard(['alexa::alerts:reminders:skill:readwrite']);

#3

Hi Alex

Can I do this?
this.$alexaSkill.showAskForPermissionsCard(['alexa::profile:name:read', 'alexa::profile:email:read', 'alexa::profile:mobile_number:read', 'read::alexa:device:all:address']);

Where can I find the list of allowed permissions?
Thanks,
Salvo


#4

Yes, it will be possible with the next release. (probably tomorrow)

Not sure if there’s one list with all permission strings. (https://developer.amazon.com/en-US/docs/alexa/custom-skills/configure-permissions-for-customer-information-in-your-skill.html)


#5

Great, thanks Alex

So tomorrow I should be able to request multiple permissions in one go, I’ll wait for the update.

I have another question, which is kinda related to this task:

Is it possible to test the permissions via the Jovo debugger? or do I need to publish the app on the Alexa console?

Thanks,
Salvo


#6

You can use the helper method now.

No, unfortunately you can’t test it via the Jovo Debugger.