Is google calendar valid for more than one month?

I am syncing my CRM system with Google Calendar. To do this, I ask push notifications

my users to Google Calendars to my system. I created the clock successfully and set the expiration time to 2030, but when I get a response from the hour event it shows the clock is set to one month.

Questions:

  • Does this mean that I need to update the clock of each custom calendar on my system monthly?
  • Is there a way to make the hours unlimited?

My code:

$channel =  new Google_Service_Calendar_Channel($client);
$uuid = gen_uuid(); 
$channel->setId($uuid); 
$channel->setType('web_hook'); 
$channel->setExpiration('1919995862000');
$address = $sugar_config['site_url'] . "/index.php?entryPoint=updateFromCal";   
$channel->setAddress($address); 
$watchEvent = $service->events->watch($bean->google_cal_id_c, $channel);

      

Answer:

    [address] => 
    [expiration] => 1417667348000
    [id] => 87453668-b1fd-4468-beca-xxxxxxxxxxxx
    [kind] => api#channel
    [params] => 
    [payload] => 
    [resourceId] => xxxxxxxxx-xxxxxxxxxxx
    [resourceUri] => https://www.googleapis.com/calendar/v3/calendars/xxxxxx@gmail.com/events?key=xxxxxxxxxxxxxxxxxxxxWHxxxxxxalt=json
    [token] => 
    [type] => 
    [modelData:protected] => Array

      

+3


source to share


1 answer


The notification channel can have an expiration time with a value determined either by your request or by any internal restrictions or Google Calendar API standards (more restrictive used). There is currently no automatic way to resume the notification channel. When the channel is about to expire, you must create a new one by calling the watch method. Below is a link for more documentation on notification channels.



+1


source







All Articles