I created a subscription in the sandbox with the following event filters:
/presence
/message-store
/message-store/instant?type=SMS
Here is the code for the WebHook php page in the subscription:
$v = $_SERVER['HTTP_VALIDATION_TOKEN'] || '';
if (strlen($v)>0) { header("Validation-Token: {$v}"); } $json_data = file_get_contents('php://input'); $fp = fopen('[path to text file]', 'a'); fwrite($fp, "Webhook event." . " " . $json_data); fclose($fp);
I would expect the webhook to be called anytime an event tied to an inbound or outbound SMS occurred. Instead, nothing is happening. It is not a permissions issue with the file.
Any help would be greatly appreciated.