Unparseable Json Response

Viewed 1658

Since i am not getting an accessToken with the simulator Request I did the above as said in
https://developers.google.com/actions/identity/account-linking#json
Request the signin helper

    header('Content-Type: application/json');
   $askToken = array (
  'conversationToken' => '{"state":null,"data":{}}',
  'expectUserResponse' => true,
  'expectedInputs' => 
  array (
    0 => 
    array (
      'inputPrompt' => 
      array (
        'initialPrompts' => 
        array (
          0 => 
          array (
            'textToSpeech' => 'MY AUTHENTICATION END POINT URL',
          ),
        ),
        'noInputPrompts' => 
        array (
        ),
      ),
      'possibleIntents' => 
      array (
        0 => 
        array (
          'intent' => 'actions.intent.SIGN_IN',
          'inputValueData' => 
          array (
          ),
        ),
      ),
    ),
  ),
);
echo json_encode($askToken);


    exit();

I get an error

Simulator Response

"

sharedDebugInfo": [
            {
                "name": "ResponseValidation",
                "subDebugEntry": [
                    {
                        "name": "UnparseableJsonResponse",
                        "debugInfo": "API Version 2: Failed to parse JSON response string with 'INVALID_ARGUMENT' error: \"expected_inputs[0].possible_intents[0]: Proto field is not repeating, cannot start list.\"."
                    }
                ]
            }
        ]
    },
    "visualResponse": {}
}

Error

API Version 2: Failed to parse JSON response string with 'INVALID_ARGUMENT' error: \"expected_inputs[0].possible_intents[0]: Proto field is not repeating, cannot start list.\"."

1 Answers
Related