How can i handle incoming sms?


#1

I’m trying to handle incoming sms on webhook url, it seems that telnyx sending data as POST request, but I’m failed to handle that. I’ve attached an example data bellow-

$_POST['from'] = false
$_POST['to'] = false
$_POST['body'] = false
$_POST['sms_id'] = false


$_SERVER['HTTP_X_TELNYX_SIGNATURE'] = t=1548846790,h=WjX3lwGdsF6hARfOuk8oNpOJhPFGVY04FB7i+07MZoI=
$_SERVER['REMOTE_ADDR'] = 192.76.120.192
$_SERVER['REQUEST_METHOD'] = POST
$_SERVER['CONTENT_TYPE'] = application/json
$_SERVER['CONTENT_LENGTH'] = 109
$_SERVER['REDIRECT_STATUS'] = 200

any advice or guidance would be greatly appreciated.