Alexa em PHP erro
Oi, estou estudando e ao mesmo tempo criando skill Alexa com PHP, nos testes funciona bem ela responde, mas ao tentar enviar para distribuição para testar na echo gera erro:
>
Citar
The skill end-point is not validating the signatures for incoming requests and is accepting requests with an empty signature URL. Please make sure that your signature validation is correct. To reject an invalid request with an invalid signature or certificate, the skill should respond with HTTP status code 400 (Bad Request) in the response.
Documentation Help:
Verifying the signature certificate URL
Meu código é bem simples:
<?php
$arrbia = json_decode(file_get_contents("php://input"), TRUE);
$strRequesbia = $arrbia["request"]["type"];
switch ($strRequestbia) {
case "LaunchRequest":
$arrResponse = [
"version" => "1.0",
"response" => [
"outputSpeech" => [
"type" => "PlainText",
"text" => "Olá bia, seja bem-vinda!"
],
"shouldEndSession" => true
]
];
break;
}
header('Content-Type: application/json;charset=UTF-8');
echo json_encode($arrResponse);
die();
Subi o arquivo para um dominio com SSL, o endereço do endpoint esta correto, mas sempre que tento enviar para distribuição, gera o erro mencionado acima.
Vocês ja trabalharam com Alexa Usando PHP? Poderiam me ajudar resolver essa questão?Discussão (1)
Carregando comentários...