Hi everybody!
I need help with Alexa authentication.
is it possible to trace the data of the user who is using my skill? In detail the email of the user’s account
Alexa user data
Simone_Leo
#1
Hi Simone,
you can check here: https://www.jovo.tech/marketplace/jovo-platform-alexa/permissions-data#contact-information
await this.$alexaSkill.$user.getEmail()
// Example
async GetEmailIntent() {
try {
const email = await this.$alexaSkill.$user.getEmail();
this.tell(`Your email address is ${email}`);
} catch(error) {
if (error.code === 'NO_USER_PERMISSION') {
this.$alexaSkill.showAskForContactPermissionCard('email')
.tell(`Please grant access to your email address.`);
}
}
},
Make sure you have set the permission in your skill:
Best,
Dominik.
Simone_Leo
#4
@dominik-meissner
How can I use this.$alexaSkill.showAskForContactPermissionCard
?
Because, at the moment the display interface is disabled
you dont need the interface. It will send a “Alexa Card” in your smartphone Alexa App.
Simone_Leo
#6
It’s strange, because if I add this in my code:
try {
const email = await this.$alexaSkill.$user.getEmail();
console.log(email);
this.tell(`Your email address is ${email}`);
} catch (error) {
console.log(error.code);
if (error.code === 'NO_USER_PERMISSION') {
this.$alexaSkill.showAskForContactPermissionCard('email').tell(`Please grant access to your email address.`);
}
}
Alexa replied with this:
vcare-chatbot-test asks you to provide permissions. For more details, see the alexa app