Hi,
I was implementing my bot using rest input channel , i followed the docs and gone through each step but on accessing my bot like this (postman ) -
http://localhost:5002/webhooks/rest/webhook
{
“sender”: “Rasa”,
“message”: “Hi”
}
I am getting an internal server error with 500 error code .
Here is the DEBUG trace
hey @NikhilBansal21 while sending the request from postman make sure you that the body paramter are in json format not text,…
1 Like
matias18233
(Fernando Matías, Cruz)
5
Hello! As a complement to your answer, I present an example of how to send the variables as jSon, through CURL.
$conexion = curl_init(REEMPLAZAR_URL);
curl_setopt($conexion, CURLOPT_POST, 1);
$valores = json_encode(array("sender" => REEMPLAZAR_ID_USUARIO, "message" => REEMPLAZAR_MENSAJE));
curl_setopt($conexion, CURLOPT_POSTFIELDS, $valores);
curl_setopt($conexion, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt($conexion, CURLOPT_RETURNTRANSFER, true);
curl_exec($conexion);
curl_close($conexion);