Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ask for sign in Dialogflow API V2 doesn't work #10

Open
Anas-siddiqui opened this issue Sep 27, 2018 · 8 comments
Open

Ask for sign in Dialogflow API V2 doesn't work #10

Anas-siddiqui opened this issue Sep 27, 2018 · 8 comments

Comments

@Anas-siddiqui
Copy link

My dialogflow agent is connected to a webhook for fulfillment using API v2, when I try to response back with ask for sign in response it doesn't perform the appropriate function and instead outputs the response from Fallback intent. Asking for permissions however work but asking for sign in never works, following is the body which I am outputting.

{
"payload": {
"google": {
"expectUserResponse": true,
"systemIntent": {
"intent": "actions.intent.SIGN_IN",
"data": {}
}
}
}
}

@jaypatel-searce
Copy link

I'm having the same issue, Did you solved it??

@Anas-siddiqui
Copy link
Author

I'm having the same issue, Did you solved it??

Nope, still waiting for someone from Dialogflow to help.

@zonder129
Copy link

Maybe you forgot to enable webhook?

@Anas-siddiqui
Copy link
Author

Maybe you forgot to enable webhook?

No ,its not a problem with webhook because if my webhook was disabled then the request would have never reached my webhook to expect a response. In this case the webhook is responding back with the above JSON body to prompt the user for SIGN IN card but it doesn't work.

@zonder129
Copy link

I see. My result is the same, but I guess this is exactly what is expected. As I understand, you need to create special event inside Dialogflow to catch response from Actions on Google to your sign in request. It doesn't comes back by default into the same intent it was called from. You can look inside your History in dialogflow and you will find out unhandled event that comes back to you from AoG.
You can read how to properly create helper requests here: https://developers.google.com/actions/assistant/helpers

@Anas-siddiqui
Copy link
Author

I see. My result is the same, but I guess this is exactly what is expected. As I understand, you need to create special event inside Dialogflow to catch response from Actions on Google to your sign in request. It doesn't comes back by default into the same intent it was called from. You can look inside your History in dialogflow and you will find out unhandled event that comes back to you from AoG.
You can read how to properly create helper requests here: https://developers.google.com/actions/assistant/helpers

Even if I use the below JSON body which I got from the Helpers page, it also gives the same result and no request comes back to the webhook for sign in or anything.

{ "payload": { "google": { "conversationToken": "{\"state\":null,\"data\":{}}", "expectUserResponse": true, "expectedInputs": [ { "inputPrompt": { "initialPrompts": [ { "textToSpeech": "PLACEHOLDER_FOR_SIGN_IN" } ], "noInputPrompts": [] }, "possibleIntents": [ { "intent": "actions.intent.SIGN_IN", "inputValueData": {} } ] } ] } } }

@zonder129
Copy link

Hi again, sorry for such a long time to respond. Use the same message as in your first message. Beside that, you will also need to enable sign in action on dialogflow web site in your intent that you expecting that message to come back. Action name is the same as the name of intent you sent to AoG (actions.intent.SIGN_IN), if I'm not mistaking. Look in your history, and I am shoore that you will have unhadled event, for me that was the key to solve this problem. At least, after you send back this request to sign in from fullfilment, account linking that you setted up before, must run.

@daiangan
Copy link

daiangan commented Oct 5, 2021

In Dialogflow, use the payload like this:

{
  "google": {
    "systemIntent": {
      "intent": "actions.intent.SIGN_IN",
      "data": {
        "@type": "type.googleapis.com/google.actions.v2.SignInValueSpec"
      }
    },
    "expectUserResponse": true
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants