question

newuser-775b4f4c-b882-4dfa-84bd-eaa94f896516 avatar image

Retrieve username of voice profile

Hello,

I'm developing an Alexa skill in java 11 to track worktimes for projects. At first asks the user for his username and then start the time tracking for this specific user. Now, that skill personalization came out, I wondered if I can use it to recognize which person is speaking, retrieve the personId from the request and get the username from the specific personId. I need the username to access the user in my MySQL database. If that doesn't work, do you have any suggestions on how I can build a realtion between the personId and an user in my database?


Thank you in advance


skillalexarequestpersonalization
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Jason@Amazon avatar image
Jason@Amazon answered

If you are using personalization, while it isn't possible to directly fetch the user's name, you can use the SSML tag alexa:name to have the name spoken in responses:

https://developer.amazon.com/en-US/docs/alexa/custom-skills/add-personalized-greetings-or-prompts.html#use-the-alexaname-tag-to-say-a-recognized-speakers-name

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.