Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DialogflowApp askForUpdatePermission Not Working

1) askForUpdatePermission not finding intent

I followed the Update Sample at Github -dialogflow-updates-nodejs and got the update permission to work.

But when I added app.askForUpdatePermission("get.next.reminder") into my own code, the simulator says that my agent is not responding. I did not get the question to give update permission.

In the simulator error tab, I see an error:

MalformedResponse
expected_inputs[0].possible_intents[0].input_value_data: The intent the app is asking for permission to send updates for is not found..

So I checked the intent name (get.next.reminder) again in my agent and it is clearly there and mapped to an action. I also tested that this intent can be triggered by user input.

The response tab shows the response like this:

{
  "conversationToken": "[\"_actions_on_google_\"]",
  "expectUserResponse": true,
  "expectedInputs": [
    {
      "inputPrompt": {
        "richInitialPrompt": {
          "items": [
            {
              "simpleResponse": {
                "textToSpeech": "PLACEHOLDER_FOR_PERMISSION"
              }
            }
          ]
        }
      },
      "possibleIntents": [
        {
          "intent": "actions.intent.PERMISSION",
          "inputValueData": {
            "@type": "type.googleapis.com/google.actions.v2.PermissionValueSpec",
            "permissions": [
              "UPDATE"
            ],
            "updatePermissionValueSpec": {
              "intent": "get.next.reminder"
            }
          }
        }
      ]
    }
  ],
  "responseMetadata": {
    "status": {
      "message": "Success (200)"
    },
    "queryMatchInfo": {
      "queryMatched": true,
      "intent": "d7edc1c1-1c67-49af-89bb-37e17ed35025"
    }
  }
}

Where I see PLACEHOLDER_FOR_PERMISSION in the response text.

Not sure why it is not finding the intent. Can anyone please please help with this?


2) How to remove permissions?

Also, a separate but related question: once you give the permission, how can you remove it? This is really important to be able to test.

like image 202
user3321947 Avatar asked Apr 04 '18 23:04

user3321947


1 Answers

1) Is the "get.next.reminder" intent configured correctly?

Go to Google action console -> project -> overview -> 5:Action discovery and updates -> action "get.next.reminder" -> User updates and notifications -> Would you like to send push notifications?

Url should be: console.actions.google.com/project/your-project/overview/actionsdiscovery/action/get.next.reminder

2) To remove permission you must clear your application or click "turn off" in the notification

like image 52
user1119279 Avatar answered Jan 03 '23 15:01

user1119279