question

N. Fradkin avatar image
N. Fradkin asked

Question about user attribute in session

From the documentation we have this description: User An object that describes the user making the request to the app. A user is composed of: - userId – A string that represents the unique identifier for the user interacting with the Alexa app. Type: string. What does this actually mean? What does the "user" relate to? Is it a unique identifier for the Echo unit itself? Does it relate to the amazon user associated with the echo, meaning if one had multiple echos they'd all send the same user id? I'd like to know the specific details so I can know how the user attribute can be used. One of the things I'd like to eventually be able to do is deploy multiple Echos around my house and have my app know which one sent the request and respond in a context sensitive manner. To give an example, to be able to say "tell MyApp to turn off the lights" and have it know it came from the living room Echo so it needs to turn off the living room lights.
alexa skills kitdebugging
10 |5000

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

The Stig avatar image
The Stig answered
>[i]What does this actually mean? What does the "user" relate to? Is it a unique identifier for the Echo unit itself?[/i] Does it relate to the amazon user associated with the echo, meaning if one had multiple echos they'd all send the same user id?[/i] I'm fairly certain the User ID is a unique number that's tied to your Amazon account. So the first time you log into the app with your Amazon credentials, Echo generates your User ID. That is then your User ID forever. >[i]Does it relate to the amazon user associated with the echo, meaning if one had multiple echos they'd all send the same user id?[/i] From my understanding of how the User ID works, yes. The User ID is tied to the Amazon account, so you'd have the same User ID regardless of how many Echos you were logged into.
10 |5000

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

N. Fradkin avatar image
N. Fradkin answered
That's what I had assumed. So not useful for identifying the specific device, but at least I can use it for registration in an app and then being able to associate data in the app to the user without them having to authenticate for every session.
10 |5000

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

Mehmet Gokhan Sevik avatar image
Mehmet Gokhan Sevik answered
If I understand correct looking at the other discussions about this topic, It is a different user Id generated for different Apps even it is the same user. So, if you have multiple Apps you will see the same user with different Ids for each App. I believe this to prevent user tracking for security purposes. Gokhan
10 |5000

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