question

Matt Kruse avatar image
Matt Kruse asked

Can I map users on the web to their Echo requests?

I'd like to build a web site for my Echo app, where users can login and configure their Echo application preferences. I assume I would have them authenticate with their Amazon login somehow. Then I would like to map their Echo requests to their preferences stored on the site. Is this supported yet? I see that requests contain a userId, but I'm not sure how or if this maps to an Amazon ID, and how I would let my users authenticate with Amazon from my web site.
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.

Nick Gardner avatar image
Nick Gardner answered
Hi, There's no direct way to get the Amazon account information, but you can use the unique userID in combination with Login with Amazon ( http://login.amazon.com/) to get account and other information, as well as map users. Thanks, Nick
10 |5000

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

Matt Kruse avatar image
Matt Kruse answered
Excellent, thank you. I wasn't sure if the user id given by the Echo would match up with the Amazon authentication or not. Another work-around which I considered was to give first-time users a code, and have them enter than on the web site. That would sync their Echo id with their web session. But if I can count on the Amazon Login to sync them up, that is perfect. Thanks!
10 |5000

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

Nick Gardner avatar image
Nick Gardner answered
Sorry, I should have been more clear there. The userID will not match directly in Login with Amazon, but you can use the unique token to associate a user login with the Amazon account. An easy way to do this would be to return a link with a unique token in the Echo App and the user can use that link to get to the LWA workflow. Its not a perfect solution but it seems like the best one currently available. Thanks for your feedback and I'll continue to look into simpler authentication options. -Nick
10 |5000

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

Matt Kruse avatar image
Matt Kruse answered
Okay, thanks for the clarification. App developers will obviously need to be able to map an Echo user to some login on their app's website, if they are building an app of any complexity. For example, if I want to let users access their Google Calendar from an Echo App, I need to let them login to my site with their Google ID, and then I need to link that user id with their Echo when they interact with my app. I don't want to rely on Cards, because I don't think many users will ever look at Cards in their echo app or online. I think it needs to be voice-driven. Since I am still struggling to get a simple "Hello World" type of app working correctly, I imagine it will be a while before I get to this point anyway. :)
10 |5000

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