I tried inbuilt variable \"user\" methods, $user.name
and $user.email
in text response of API.AI, to greet user and show email-Id. Is there any inb
Since the original question was asked, there are now ways to get this information - with some caveats.
You can now use Google Sign In for Assistant to get profile information such as their Google ID and Name. If they have permitted their email address in the profile, this is included as well.
If you are using the actions-on-google library, this will be available in your Intent Handler in conv.user.profile.payload
. If that isn't set, you can request it by using the Sign-In Helper to request it.
If you are using multivocal, you can set User/IsAuthenticated
as a requirement and the information will be available in the environment under User/Profile
.
In either case, the user will have to grant you permission to get the information the first time. After that, this information should be available for all subsequent requests.