Event:Watch and Channels in Google Calendar

6,133 views
Skip to first unread message

Himanshu Jain

unread,
Jul 29, 2013, 3:32:23 AM7/29/13
to google-ca...@googlegroups.com
Hi All,
Google have recently released two new features in Google Calendar Documentation.
1) Event:Watch in Google Calendar
2) Channels in Google Calendar
So can any one explain this as i am not getting their point that what they are trying to do.

Vova Galchenko

unread,
Jul 31, 2013, 2:29:21 AM7/31/13
to google-ca...@googlegroups.com
Himanshu,

The point of the watch API is that you can tell Google that you're interested in all changes that are made to the events of a given calendar. When you make the call, you provide the URL that Google will call whenever any changes are made to the calendar. This can be very useful if you want to react to calendar changes or if you're just trying to keep your model of the calendar in sync with Google's.

Unfortunately, I haven't gotten this API to fully work for me as I'm not able to get any notifications except for the initial "sync" messages. Please see here for more detail: https://groups.google.com/forum/embed/?place=forum/google-calendar-api#!topic/google-calendar-api/H71Bu0pBspw

vova
Message has been deleted

Himanshu Jain

unread,
Aug 13, 2013, 7:34:02 AM8/13/13
to google-ca...@googlegroups.com
Thanks for your reply. Do you have any idea how to use Watch in Google calendar. actually I am getting one problem like if i have created a meeting into Google calendar using my application and after that i manually deleted that meeting from Google calendar, and i am again creating a meeting on the same time then it is showing busy because i am have an entry in my database because i have manually deleted the meeting from Google calendar. so is there any other procedure of getting the notification if there is any change to our event on Google calendar...

Vova Galchenko

unread,
Aug 14, 2013, 11:51:44 AM8/14/13
to google-ca...@googlegroups.com
Himanshu,

Yes, I have an idea of how to use the watch API. You can just follow the guidelines here: https://developers.google.com/google-apps/calendar/v3/push where the procedure of using the watch API is discussed in great detail.

As for this problem that you're describing, if I understand you correctly, the issue is that your application's DB doesn't stay in sync with Google calendar when the user makes changes to it from outside of your application. If that's so, you have three choices:

1. Poll the calendar at some time interval to get your application in sync.
2. Use push notifications to have Google call your server everytime something changes, so you can react to these changes.
3. Use some combination of 1 and 2.

I hope that makes sense.

On another note, could you please remove your post from https://groups.google.com/forum/#!topic/google-calendar-api/H71Bu0pBspw

That thread is about a very specific push notification issue and we're hoping to have Google look at it and fix the issue. Your question is rather general and if you could post it as a separate thread with more detail of what exactly is not working for you, I would be happy to try to help you.

vova
Message has been deleted
Message has been deleted

Himanshu Jain

unread,
Aug 19, 2013, 2:28:40 AM8/19/13
to google-ca...@googlegroups.com
Hi,
Thank for you reply. if i get the request header values on my webpage then how can i come to know that what are the events have changed over this calendar. As in request header it is setting up below mentioned parameters
POST https://mydomain.com/notifications // Your receiving URL.
Content-Type: application/json; utf-8
Content-Length: 0
X-Goog-Channel-ID: 4ba78bf0-6a47-11e2-bcfd-0800200c9a66
X-Goog-Channel-Token: 398348u3tu83ut8uu38
X-Goog-Channel-Expiration: 1367869013915
X-Goog-Resource-ID:  ret08u3rv24htgh289g
X-Goog-Resource-URI: https://www.googleapis.com/calendar/v3/calendars/my_ca...@gmail.com/events
X-Goog-Resource-State:  exists
X-Goog-Message-Number: 10
If i have changed the Summary and event time then how can i retrieve it because it is not passing any event ID.

Petr Kolínek

unread,
May 26, 2015, 4:08:13 AM5/26/15
to google-ca...@googlegroups.com, jnhiman...@gmail.com
Hello Himansku,
I'm not sure, if you already got your question answered. However if not, all you need to do is called "Incremental sync", since push notifications just tells you there has been some changes of the watched resources.
Hope this answer was helpful.

Read:
https://developers.google.com/google-apps/calendar/v3/push
https://developers.google.com/google-apps/calendar/v3/sync#incremental_sync

Dne pondělí 19. srpna 2013 8:28:40 UTC+2 Himanshu Jain napsal(a):
Hi,
Thank for you reply. if i get the request header values on my webpage then how can i come to know that what are the events have changed over this calendar. As in request header it is setting up below mentioned parameters
POST https://mydomain.com/notifications // Your receiving URL.
Content-Type: application/json; utf-8
Content-Length: 0
X-Goog-Channel-ID: 4ba78bf0-6a47-11e2-bcfd-
0800200c9a66
X-Goog-Channel-Token: 398348u3tu83ut8uu38
X-Goog-Channel-Expiration: 1367869013915
X-Goog-Resource-ID:  ret08u3rv24htgh289g
X-Goog-Resource-URI: https://www.googleapis.com/calendar/v3/calendars/my_cale...@gmail.com/events
X-Goog-Resource-State:  exists
X-Goog-Message-Number: 10

Stuart Rothrock

unread,
Nov 7, 2016, 4:58:52 PM11/7/16
to Google Calendar API, jnhiman...@gmail.com
Thank you very much for this reply - I spent many hours trying to figure out how to see what had changed...

vikas choudhary

unread,
Jun 19, 2020, 2:49:23 AM6/19/20
to Google Calendar API
Can you Please tell me what is 'X-Goog-Channel-ID', Where I can found it


On Monday, 19 August 2013 11:58:40 UTC+5:30, Himanshu Jain wrote:
Hi,
Thank for you reply. if i get the request header values on my webpage then how can i come to know that what are the events have changed over this calendar. As in request header it is setting up below mentioned parameters
POST https://mydomain.com/notifications // Your receiving URL.
Content-Type: application/json; utf-8
Content-Length: 0
X-Goog-Channel-ID: 4ba78bf0-6a47-11e2-bcfd-
0800200c9a66
X-Goog-Channel-Token: 398348u3tu83ut8uu38
X-Goog-Channel-Expiration: 1367869013915
X-Goog-Resource-ID:  ret08u3rv24htgh289g
X-Goog-Resource-URI: https://www.googleapis.com/calendar/v3/calendars/my_cale...@gmail.com/events
X-Goog-Resource-State:  exists
X-Goog-Message-Number: 10

Stuart Rothrock

unread,
Jun 19, 2020, 3:41:34 AM6/19/20
to google-ca...@googlegroups.com
It is a value you create and send with your watch request. It is used to identify a notification you receive. If you had multiple watch requests, it would be the only way for you to know which watch request to associate it. Here is a link to the documentation for it.

On Fri, Jun 19, 2020 at 2:49 AM vikas choudhary <myvik...@gmail.com> wrote:
Can you Please tell me what is 'X-Goog-Channel-ID', Where I can found it


On Monday, 19 August 2013 11:58:40 UTC+5:30, Himanshu Jain wrote:
Hi,
Thank for you reply. if i get the request header values on my webpage then how can i come to know that what are the events have changed over this calendar. As in request header it is setting up below mentioned parameters
POST https://mydomain.com/notifications // Your receiving URL.
Content-Type: application/json; utf-8
Content-Length: 0
X-Goog-Channel-ID: 4ba78bf0-6a47-11e2-bcfd-0800200c9a66
X-Goog-Channel-Token: 398348u3tu83ut8uu38
X-Goog-Channel-Expiration: 1367869013915
X-Goog-Resource-ID:  ret08u3rv24htgh289g
X-Goog-Resource-URI: https://www.googleapis.com/calendar/v3/calendars/my_ca...@gmail.com/events
X-Goog-Resource-State:  exists
X-Goog-Message-Number: 10
If i have changed the Summary and event time then how can i retrieve it because it is not passing any event ID.

On Wednesday, 14 August 2013 21:21:44 UTC+5:30, Vova Galchenko wrote:
Himanshu,

Yes, I have an idea of how to use the watch API. You can just follow the guidelines here: https://developers.google.com/google-apps/calendar/v3/push where the procedure of using the watch API is discussed in great detail.

As for this problem that you're describing, if I understand you correctly, the issue is that your application's DB doesn't stay in sync with Google calendar when the user makes changes to it from outside of your application. If that's so, you have three choices:

1. Poll the calendar at some time interval to get your application in sync.
2. Use push notifications to have Google call your server everytime something changes, so you can react to these changes.
3. Use some combination of 1 and 2.

I hope that makes sense.

On another note, could you please remove your post from https://groups.google.com/forum/#!topic/google-calendar-api/H71Bu0pBspw

That thread is about a very specific push notification issue and we're hoping to have Google look at it and fix the issue. Your question is rather general and if you could post it as a separate thread with more detail of what exactly is not working for you, I would be happy to try to help you.

vova

On Tuesday, August 13, 2013 4:34:02 AM UTC-7, Himanshu Jain wrote:
Thanks for your reply. Do you have any idea how to use Watch in Google calendar. actually I am getting one problem like if i have created a meeting into Google calendar using my application and after that i manually deleted that meeting from Google calendar, and i am again creating a meeting on the same time then it is showing busy because i am have an entry in my database because i have manually deleted the meeting from Google calendar. so is there any other procedure of getting the notification if there is any change to our event on Google calendar...

--
You received this message because you are subscribed to a topic in the Google Groups "Google Calendar API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-calendar-api/5eU8UKsnYzg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-calendar...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-calendar-api/6a05d5f5-e302-4528-a662-ee4892cc7b77o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages