Heres my webhook code
$challenge = file_get_contents('php://input');
$result = json_decode($challenge);
$Response = $result->challenge;
$WebHookId = $result->webhookId;
header("Authorization: Bearer".SS_TOKEN);
header('Smartsheet-Hook-Response:'.$Response);
http_response_code(200);
$events = $result->events;
foreach($events as $item){
if ($item->objectType == 'row' && $item->eventType =='created'){
(int)$rowID = $item->id;
break;// leave loop after row Id obtained
}
}
I'm emailing the $events data to myself and I get the following:
[{"objectType":"row","eventType":"created","id":6260377225717636,"userId":3106431567193988,"timestamp":"2022-04-28T15:55:02.000+00:00"},{"objectType":"row","eventType":"updated","id":129455292082052,"userId":3106431567193988,"timestamp":"2022-04-28T15:55:02.000+00:00"},{"objectType":"row","eventType":"created","id":6647903534901124,"userId":3106431567193988,"timestamp":"2022-04-28T15:58:39.000+00:00"},{"objectType":"row","eventType":"updated","id":6260377225717636,"userId":3106431567193988,"timestamp":"2022-04-28T15:58:39.000+00:00"},{"objectType":"row","eventType":"updated","id":1995583549138820,"userId":3106431567193988,"timestamp":"2022-04-28T16:01:02.000+00:00"},{"objectType":"row","eventType":"deleted","id":3458390759237508,"userId":3106431567193988,"timestamp":"2022-04-28T16:01:02.000+00:00"},{"objectType":"row","eventType":"deleted","id":129455292082052,"userId":3106431567193988,"timestamp":"2022-04-28T16:01:02.000+00:00"},{"objectType":"row","eventType":"deleted","id":3592060878907268,"userId":3106431567193988,"timestamp":"2022-04-28T16:01:02.000+00:00"}, ..............more
When I look at the properties for the sheet the row created has an id of 1612139205945220
What's happening??