Get location/address of Amazon Echo device

痞子三分冷 提交于 2019-12-11 07:39:31

问题


I am making an Alexa skill which needs to send the location of the Echo being used to an API within my Lambda function.

https://www.amazon.com/gp/help/customer/display.html?nodeId=201601980 says we can access many details about the Echo, such as Device Location, but in my skill, I don't see this is available in the session:

exports.handler = function (event, context) {
   try {
       console.log("event.session: " + event.session);

How can I get this data?

The point is, while we have the address of the user coming from my App API, they may have set an address where they're not currently at (aka, they've placed an order from an Echo that's not the same as their address).

Thanks!


回答1:


Access to the profile information doesn't appear to be available. If the account is linked, the only option I see is to route them back to your web site to provide information necessary to complete the order.




回答2:


You can now get the address of the device, as specified in the customer’s device settings.

This is new as of 2017-04-05. See Amazon's blog post about their new Device Address API.



来源:https://stackoverflow.com/questions/38001615/get-location-address-of-amazon-echo-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!