Null response for name and email entities

前端 未结 4 1553
名媛妹妹
名媛妹妹 2021-01-06 06:05

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

4条回答
  •  花落未央
    2021-01-06 06:46

    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.

提交回复
热议问题