title: Google Api v3 get modified event via watch(web_hook)
body: <p>Am using Google Api v3 for adding and modifying google events .
  most of the thing works fine except am unable to get the changes made in google events
  am using the below code :</p>
  
  <pre><code>require_once 'google-api-php-client/src/Google/Client.php';
  require_once 'google-api-php-client/src/Google/Service/Analytics.php';
  require_once 'google-api-php-client/src/Google/Service/Calendar.php';
  
  $client_id = 'my-client_id';  // works without this
  $Email_address = 'my-Email_address';
  $key_file_location = 'my-key_file_location.p12';
  
  
  $client = new Google_Client();
  $client-&gt;setApplicationName("app-name"); // works without random names
  $key = file_get_contents($key_file_location);
  
  $scopes = array('https://www.googleapis.com/auth/calendar', 'https://www.googleapis.com/auth/calendar.readonly');
  
  
  $cred = new Google_Auth_AssertionCredentials($Email_address, $scopes , $key);
  $client-&gt;setAssertionCredentials($cred);
  
  if ($client-&gt;getAuth()-&gt;isAccessTokenExpired())
  {
      $client-&gt;getAuth()-&gt;refreshTokenWithAssertion($cred);
  }
  
  
  $service = new Google_Service_Calendar($client);
  
  $cals = $service-&gt;calendarList-&gt;listCalendarList();
  $event = new Google_Service_Calendar_Event();
  
  $event-&gt;setSummary('04/03 appointment -1');
  $start = new Google_Service_Calendar_EventDateTime();
  $start-&gt;setDateTime('2015-03-27T11:00:00.000-00:00');
  $start-&gt;setTimeZone('Asia/Calcutta');
  $event-&gt;setStart($start);
  $end = new Google_Service_Calendar_EventDateTime();
  $end-&gt;setDateTime('2015-03-27T11:25:00.000-00:00');
  $end-&gt;setTimeZone('Asia/Calcutta');
  $event-&gt;setEnd($end);
  $attendee1 = new Google_Service_Calendar_EventAttendee();
  $attendee1-&gt;setEmail('myemail@gmail.com'); 
  $attendees = array($attendee1);
  $event-&gt;attendees = $attendees;
  $recurringEvent = $service-&gt;events-&gt;insert('randome-id@group.calendar.google.com', $event);
  echo $dynamicId =  $recurringEvent-&gt;getId();
  
  $events = $service-&gt;events-&gt;listEvents('randome-id@group.calendar.google.com');
  
  echo "&lt;br&gt;start - into web hoot &lt;br&gt;";
  
  $service = new Google_Service_Calendar($client);
  $channel =  new Google_Service_Calendar_Channel($client);
  $channel-&gt;setId($dynamicId);
  $channel-&gt;setType('web_hook');
  
  echo '&lt;br&gt;';
  echo $url = 'https://mydomain.com.return.php';
  $channel-&gt;setAddress($url);
  
  $timetoExpire = time()+3600000;
  
  
  $optParams = array('ttl' =&gt; $timetoExpire);
  $channel-&gt;setParams($optParams);
  
  try
  {
      echo "&lt;br&gt;";
      $watchEvent = $service-&gt;events-&gt;watch('randome-id@group.calendar.google.com', $channel);
      print_r($watchEvent);
      echo "&lt;br&gt;hook applied&lt;br&gt;";
  }
  catch(Exception $e)
  {
      echo $e;
      echo "web hook not working&lt;br /&gt;.";
  }
  
  echo "&lt;br&gt;end";
  
  exit;
  </code></pre>
  
  <p>return response comes properly in <a href="https://mydomain.com.return.php" rel="nofollow">https://mydomain.com.return.php</a> but still am not sure how to read the response</p>
  
  <p>and am unsure 
  what is </p>
  
  <pre><code>[resourceId] =7U94nhlXTXH_tK13-5JIrZTBWU0
  [resourceUri] =https://www.googleapis.com/calendar/v3/calendars/randome-id@group.calendar.google.com/events?alt=json
  </code></pre>
  
  <p>please help me to figure out how to get the modified event date in goggle calender Thanks in advance</p>