Renold Xavier
Renold Xavier

Reputation: 21

Is there limit to the ttl param of the google calendar watch api?

I've been working on google calendar sync in node js. I want the notification channel for watching the events to be active forever, but I found that the time to live parameter is defaulted to 3600 seconds. Is there a limit to the value I can give as the time to live? The idea is to give a high enough value so that the channel lives practically for ever. Will this work? Or is it better to refresh these channels now and then?

Thanks in advance :) .

Upvotes: 2

Views: 933

Answers (1)

Aleks
Aleks

Reputation: 5378

The maximum time is 2592000 seconds, or in other words 30 days.

This is not defined in the documentation, but if you try to set ttl to 50 years, or 60 days, it will set the expiration to 30 days from the point you created the notification channel.

Side-note: default is 604800 (at least this year)

Upvotes: 2

Related Questions