如何在Dialogflow chatbot中实现登录 [英] How to implement Login in Dialogflow chatbot

查看:56
本文介绍了如何在Dialogflow chatbot中实现登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Webhook将登录名添加到我的聊天机器人。我想从用户那里获取用户名和密码,并将其发送到Webhook。

i want to add login to my chatbot with webhook.I want to take username and password from user and send it to the webhook.

推荐答案

我知道您为此获得的搜索结果很少

有以下方法

I know you didn't get much search results for that
there are following approaches


  1. 如果您仅将 Google助手用于聊天机器人,则使用内置的登录 必需选项,然后打开链接 https://console.actions.google.com/project/ 您的项目名称 / accountlinking /并在其中提供所需的设置,例如

    您要注册吗?或仅登录

    选择Oauth和隐式类型

    输入端点url

    和bingo,您将在Google Assistant中获得用于登录的按钮

  1. If you use only Google Assistant for chatbot then use built in "Sign-in" required option and then open link https://console.actions.google.com/project/your-project-name/accountlinking/ and in that provide your required settings like
    "Do you want signup ?" or "Login Only"
    select type of Oauth and Implicit
    Enter the endpoint url
    and bingo you will get button in Google Assistant for login

如果要添加网络演示登录,请使用检测Intent API
,然后转到帐户链接 OAuth2 使用代码流隐式流,但我建议您先进行隐式流。
每种语言都有多种资源。

集成API,您需要一个服务帐户密钥,将其添加到您的环境中以对Google api的身份验证

,然后使用 detectIntent 函数以获取响应和重要使用唯一会话ID

If you wanna add login for web-demo use Detect Intent API then go for Account linking OAuth2 using either code flow or implicit flow but I would suggest to go for implicit flow first. there are various resourses out here for each language.
Integrating API you need a service account keys add that to your enviornment for Authentication to google apis
then use detectIntent function to get response and IMPORTANT use Unique session id

希望您收到它;-)

这篇关于如何在Dialogflow chatbot中实现登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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