i set my application to watch a google calendar of mine.
when a new event is created in the calendar i get a notification into my application successfully.
The problen is that the POSt headers of the push notification message, does not include the eventID that was created in the calendar.
Is the push notification POST message that is send from the Google API to my application, supposed to have teh new eventID?
or the push notification only supposed to tell me "there was some change" but not give me the exact event ID of the event that changed?
the response POST Headers are these:
[Content-Type] => application/json; charset=UTF-8
[Accept] => */*
[X-Goog-Channel-ID] => xxxxxxx-xxxxx-xxxx-ac19-b82e0ca32206
[X-Goog-Channel-Expiration] => Fri, 05 Dec 2014 06:12:10 GMT
[X-Goog-Resource-State] => exists
[X-Goog-Message-Number] => 3711944
[X-Goog-Resource-ID] => xxxxxxx-xxxxxx-pSbC27qOUfg
[Content-Length] => 0
[Connection] => Keep-alive
[Accept-Encoding] => gzip,deflate
i always get the same "
X-Goog-Resource-ID" parameter value, no matter which evnt i created in teh calendar. why? isn't X-Goog-Resource-ID supposed to return the event ID?
the code for adding the watch for events is:
service = new Google_Service_Calendar($client);
$channel = new Google_Service_Calendar_Channel($client);
$uuid = gen_uuid();
$channel->setId($uuid);
$channel->setType('web_hook');
$channel->setExpiration('1919995862000');
global $sugar_config;
$address = $sugar_config['site_url'] . "/index.php?entryPoint=updateFromCal";
$channel->setAddress($address);
$watchEvent = $service->events->watch($bean->google_cal_id_c, $channel);