question

soumya avatar image
soumya asked

User identification

  1. I have a web service that hosts favorite music files links for different users from different url
  2. No i want to create a service so that if i ask alexa it will play a song from my bookmarks
  3. user will ask "Alexa please play my favorite songs" and there are thousand users
  4. Now how Alexa custom skill will identify which user it is?
  5. Does user has to always enable the custom skill by Alexa APP first
  6. Then with each generated directives there will be a user id included and send to lambda
  7. Or i need to support and configure account linking?

Is it true that my lambda function always receives a unique user id with every directives from Alexa service for custom skill.

How alexa app generates a unique user id and based on what?

alexa skills kitalexa
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

jjaquinta avatar image
jjaquinta answered

The answer to the question you asked is that UserID is what you want to use. This is guaranteed to be unique to each user and consistent from visit to visit. It is not, however, unique from skill to skill. Or, if a user disables and re-enables the skill, they will get a new UserID.

However, you have a much bigger problem. If you read the docs, Alexa will only let you reply with a MP3 file up to 90 seconds long. So, unless your users only listen to very short music, you will not be able to produce the skill you want.

10 |5000

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