3
我使用Google日曆同步我的CRM系統。爲此,我要求我的用戶Google日曆中的push notifications
加入我的系統。 我已成功創建手錶,並將到期時間設置爲2030年,但是當我收到手錶事件的響應時,它會顯示手錶的到期時間設置爲一個月。谷歌日曆手錶超過一個月的過期時間?
問題:
- 這是否意味着我每個月需要刷新每個用戶的日曆的手錶在我的系統?
- 有沒有辦法讓手錶無限制?
我的代碼:
$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);
響應:
[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/[email protected]/events?key=xxxxxxxxxxxxxxxxxxxxWHxxxxxxalt=json
[token] =>
[type] =>
[modelData:protected] => Array