Cette signature est présente dans l'en-tête de la requête, dans la variable Cards-Signature.
Voilà un exemple de code PHP pour récupérer la requête et la vérifier :
// secret key of the webhook endpoint$endpoint_secret ='xxxx';// get payload$payload =@file_get_contents('php://input');// get signature$signature_header ='';$headers =apache_request_headers();if (isset($headers['Cards-Signature'])and!empty($headers['Cards-Signature'])) { $signature_header = $headers['Cards-Signature'];}// verify signature$buildHash =hash_hmac('sha256', $payload, $secret_endpoint_key);if ($buildHash !== $signature_header) {// key is incorrecthttp_response_code(400);exit();}// get payload data$event_type =false;if (isset($payload)and!empty($payload)) { $payload =json_decode($payload); $event_type = $payload->type;}// handle the requestif ($event_type =='survey-complete') {// a survey has been complete} elseif ($event_type =='quiz-complete') {// a quiz has been complete} elseif ($event_type =='chapter-complete') {// a chapter has been complete} elseif ($event_type =='training-complete') {// a training has been complete}