,因为我没有与模拟器请求我做以上为
https://developers.google.com/actions/identity/account-linking#json
请求的登入帮手无法解析JSON响应
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();
我得到一个错误,说得到一个的accessToken
模拟器响应
"
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": {}
}
错误
API版本2:解析失败JSON响应字符串与 'INVALID_ARGUMENT' 错误:\ “expected_inputs [0] .possible_intents [0]:proto字段不重复,不能启动列表\””
三江源指出了这一点! :) – Elo97234c
当我做到了,我只是'对不起,我没有得到任何回应。' – Elo97234c
在文档中,https://developers.google.com/actions/identity/account-linking#json他们有一些名为PLACEHOLDER_FOR_SIGN_IN的东西。它应该是我的身份验证端点url吗? – Elo97234c