Not Receiving JSON date from webhook


Hello, I have a was ec2 server running a ubuntu server with LAMP setup. To what I can tell I have the correct web hook link as I can connect from a browser to the php page. I have the following code in the page…

# taking data from HubSpot's webhook

$hookData = json_decode(file_get_contents("php://input"), true);
$file = fopen("datadump.txt", "w");
fwrite($file, $hookData);
var_dump($hookData); // test input
echo "\nTest completed\n" . $hookData;

The web hook is set to POST as I need to send to the php page. Any advice would be appreciated, thank you so much.