私はエラー解析できないJSONレスポンス
を取得
https://developers.google.com/actions/identity/account-linking#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: '例外Invalid_argument' エラーでJSONレスポンス文字列を解析できませんでした:\。 "expected_inputs [0] .possible_intents [0]:プロトフィールドが繰り返されていない、リストを開始することはできません\"」
ような構文を使用して、オブジェクトに配列をキャストする必要が
! :) – Elo97234c
私はそれをやった後、私はちょうど '申し訳ありませんが、私は応答を得ていない。 – Elo97234c
ドキュメントのhttps://developers.google.com/actions/identity/account-linking#jsonには、PLACEHOLDER_FOR_SIGN_INというものがあります。それは私の認証エンドポイントのURLであるはずですか? – Elo97234c