2

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.

Ramesh M
  • 31
  • 2
  • 4

1 Answers1

3

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

  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

  2. 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

hope you got it ;-)

Alireza Mirian
  • 5,862
  • 3
  • 29
  • 48
Onk_r
  • 836
  • 4
  • 21
  • 1
    How to get access token of a user, if an user already logged in? Actually, I've put Iframe of a chatbot in users profile section. So if the user logged in to his profile then he will able to access dialogflow, I want to know how to get that access token in that Iframe – Jay Patel Aug 16 '18 at 12:23
  • @JayPatel did you ever find an answer to his? – Christopher Smit Oct 24 '19 at 07:37