I am writing a custom skill for the amazon echo and I need to get a unique device id so I can register then product to my service. Everything I read says that you cannot get the id from the device. Has amazon changed this? Is there a work around to get a device id?
Asked
Active
Viewed 3,381 times
4
-
This is the same I think as this question. And also refers to an update that provides a solution. https://stackoverflow.com/questions/38351019/get-unique-device-id-for-every-amazon-echo-devices – ssaltman Mar 24 '18 at 20:42
3 Answers
7
This week Amazon added the Device ID (unique) to the LaunchRequest JSON payload in Alexa Skills.
{
"session": {
"new": true,
"sessionId": "string",
"application": {
"applicationId": "string"
},
},
"context": {
"device": {
"deviceId": "string",
},
"request": {}
}
You can use the context->device->deviceId string to uniquely identify the device from which the request came.

mdaddy
- 742
- 9
- 10
2
There is no way to get a unique device ID. All you can do is get a unique User ID. There is no known workaround.

Joseph Jaquinta
- 2,118
- 17
- 15
0
If you're looking for how to get Alexa Device ID?
Use the below snippet, It will work like a charm.
device_id = handler_input.request_envelope.context.system.device.device_id
I hope this helps you.

vijayraj34
- 2,135
- 26
- 27