I am currently developing a web API where I need to listen for Google Calendar updates. I have therefor implemented the google push notifications for PHP following the documentation and everything works fine (Receiving notifications).
The problem I have is that I would like to update the channel expiration time so I don't have to create a new one every time. That is a waste of GPU and API requests, because as the documentation indicates, every time you create a new channel you start with a full initial sync (Synchronize Resources Efficiently) .
Instead, I would like to always make incremental synchronization. Any ideas on how to update the "expiration" field ?
You cannot update the channel expiration time, you have to create a new one.
From the link you provided, Renewing notification channels:
Currently there is no automatic way to renew a notification channel. When a channel is close to its expiration, you must create a new one by calling the
watchmethod.