Reputation: 549
I want to sync google calendar with my app.
When user add some event in the Google calendar at that time,
I want these new event in my node server response
Means live sync with google calendar.
I want something like listener that listen new event.
Upvotes: 2
Views: 4693
Reputation: 1343
With Google Calendar API you can watch for changes to Events or CalendarList resources, see this and this. Basically you will need to create an endpoint on your server which will receive events/calendars update notifications. When notification arrives, request a calendars/events synchronization. To make the synchronization efficient, use incremental sync. Check this question also to see the algorithm.
Upvotes: 3
Reputation: 13469
You may check this Quickstart tutorial and node-google-calendar.
You need to create a service account if you don't have one. A public/private key pair is generated for the service account, which is created from the Google API console. Take note of the service account's email address and store the service account's json or P12 private key file in a location accessible to your application. Your application needs them to make authorized API calls. If a user wants to give access to his Google Calendar to your application, he must give specific permission for each of the calendars to the created Service Account using the supplied email address under the Google Calendar settings.
Upvotes: 2