Search code examples
javajsonactions-on-googledialogflow-esgoogle-home

dialogflow permission error : "Not allowed to ask for PII in apps designed for family."


I'm getting this error when sending a permission request from my webhook to dialogflow:

MalformedResponse expected_inputs[0].possible_intents[0].input_value_data: Not allowed to ask for PII in apps designed for family.

this is my json response:

   {
      "payload": {
        "google": {
          "expectUserResponse": true,
          "systemIntent": {
            "intent": "actions.intent.PERMISSION",
            "data": {
              "@type": "type.googleapis.com/google.actions.v2.PermissionValueSpec",
              "optContext": "To deliver your order",
              "permissions": [
                "NAME",
                "DEVICE_PRECISE_LOCATION"
              ]
            }
          }
        }
      }
    }

and this is raw api response on dialogflow

    {
  "responseId": "0f9b3201-27f4-4994-9ecc-ee827f25b00e",
  "queryResult": {
    "queryText": "trouve ma position",
    "action": "request_permission",
    "parameters": {
      "Conversation-entites": "position"
    },
    "allRequiredParamsPresent": true,
    "fulfillmentMessages": [
      {
        "text": {
          "text": [
            ""
          ]
        }
      }
    ],
    "webhookPayload": {
      "google": {
        "expectUserResponse": true,
        "systemIntent": {
          "data": {
            "optContext": "To deliver your order",
            "@type": "type.googleapis.com/google.actions.v2.PermissionValueSpec",
            "permissions": [
              "NAME",
              "DEVICE_PRECISE_LOCATION"
            ]
          },
          "intent": "actions.intent.PERMISSION"
        }
      }
    },
    "intent": {
      "name": "projects/monappli-c5bf0/agent/intents/c4a07ba8-2258-4836-8e90-7b552584e8eb",
      "displayName": "request_permission"
    },
    "intentDetectionConfidence": 1,
    "diagnosticInfo": {
      "webhook_latency_ms": 316
    },
    "languageCode": "fr"
  },
  "webhookStatus": {
    "message": "Webhook execution successful"
  }
}

I'm just trying to get Google home information likes position and name

thanks for help


Solution

  • The error message says that you're doing two things that are mutually exclusive:

    • You've indicated that the action will be available under the "Actions for Families" program.

    • You are requesting Personally Identifiable Information, including Name and Specific location.

    The eligibility criteria for Actions for Families specifically states:

    Actions may not collect or solicit any personally identifiable user data.

    and

    Actions may not use Google sign-in (account linking), request OAuth scopes, access most user data APIs (except for coarse device location), or access any transaction APIs.

    If you need to request this information, then you should remove the Action from the Actions for Families program by going to the Actions on Google Console and

    1. Selecting Directory Information from the left navigation.

    2. Opening the Additional Information section.

    3. Setting "For Families" to No.

    enter image description here