Code Samples

Listener example in PHP

Here a simple example to catch the webhook message and parse the data:

< ? php

$headers = getallheaders(); //get headers
$jsonPayload = file_get_contents('php://input'); //get the json body
$aPayload = json_decode($jsonPayload, true);  //headers
$auth = $headers['Authorization'];  //payload
$event = $aPayload['event'];
$userId = $aPayload['userId'];
$tenantId = $aPayload['tenantId'];  echo $auth;
echo $event;
echo $userId;
echo $tenantId;   
?>