,因爲我沒有與模擬器請求我做以上爲
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