I am developing an application using 500 Amazon echo devices and I need a way to uniquely identify from which device the request came from. Is there a way to get a unique identifier of a device during the execution of the Java lambda function for my perticular skill.
Asked
Active
Viewed 100 times
1 Answers
1
Follow these steps
- Go to the Alexa Console -> Create/Edit Skill -> Permissions -> Enable necessary fields, preferably email in your case
- Get the requester email during request in fulfilment. Sample code below
Sample Python code
def get_user_info(access_token):
amazonProfileURL = 'https://api.amazon.com/user/profile?access_token='
r = requests.get(url=amazonProfileURL+access_token)
if r.status_code == 200:
return r.json()
else:
return False

omuthu
- 5,948
- 1
- 27
- 37
-
can you provide me a java code? that will be helpful. – Rishabh Awatani Feb 12 '20 at 07:25
-
For Java code refer: https://stackoverflow.com/questions/47512120/how-to-get-amazon-user-email-with-java-in-alexa-skill – omuthu Feb 12 '20 at 08:02