I have AWS Cognito account linking setup with Actions on Google. I have requested the scope of email. I am using API.AI, how can I get the user's email? From what I've read, you get a userId that is basically an anonymous id. How can I get user details?
Asked
Active
Viewed 411 times
0
-
Can you clarify what you mean by "AWS Cognito account linking setup with Actions on Google"? – Prisoner Oct 06 '17 at 13:06
-
@Prisoner I have a User Pool in AWS cognito with an App Client which I used to authenticate users for my Actions on Google application. This seems to work, as I can log into my User Pool when I invoke my application on Google Assistant. I get a random userId back but cant seem to get the user's email or any associated information from Cognito. – Nelson.b.austin Oct 06 '17 at 16:45
1 Answers
1
For getting user details like mail id etc, you would have to enable Account linking on your google home dialog flow console. You would also have to provide an Oauth2 server to get the authorization done. Refer to this : https://developers.google.com/actions/identity/account-linking
Once this is done, you will receive an auth_token every time your api.ai app is invoked. You will then have to use this token and retrieve the user details like mail id from Google API services.
Let me know if I need to add more details, in case its not clear.

Surjit R
- 315
- 1
- 5