当最终用户在Google Hangouts上与Dialog flow ChatBot对话时,我如何获取用户电子邮件,姓名 [英] How i can get user email,name while end user talking to Dialog flow ChatBot on Google Hangout

查看:56
本文介绍了当最终用户在Google Hangouts上与Dialog flow ChatBot对话时,我如何获取用户电子邮件,姓名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要集成DialogFlow Bot与环聊集成,我需要聊天机器人正在与之通信的用户名和电子邮件

Am going to integrate DialogFlow Bot with Hangout integration, I need the username and email whom my chatbot is communicating

推荐答案

具有看看这个:
https://developers.google .com / hangouts / chat / reference / message-formats / events

当用户发送消息,添加机器人或执行任何事件时,您可以获取名称和电子邮件。例如,在Python中,它看起来像这样:

When user sends a message, or adds the bot or does any event, you can get the name and email. For example in Python it would look like this:

@app.route('/', methods=['POST'])
def on_event():
    event = request.get_json()

    if event['type'] == 'MESSAGE':
        response = event['user']['displayName'])
        email = event['user']['email'])

这篇关于当最终用户在Google Hangouts上与Dialog flow ChatBot对话时,我如何获取用户电子邮件,姓名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆