I have a web application which fetches the Google calendar events and stored it locally.We were using the version 2 ,which people uses there Google account's credentials to fetch the data.But the latest version is using the client ID . But for my application there are lots of users so generating the client ID for each user seems not practical. Also I'm using the .NET version 3.5. Please guide me to set up calendar sync.
2 Answers
I'm not fully sure what your needs are, but it sounds like the users never use your application to access their calendars, but for whatever reasons, you do. It sounds like you need to use an option that I needed for similar reasons. I went with the service account after using the hardcoded credentials. If you want to go the route of not authenticating each user (which is what I needed), you can use the service account option here by creating a service account for your app. https://developers.google.com/accounts/docs/OAuth2ServiceAccount.
Then you can take the service account client ID and also delegate domain-wide access to the service account and through the google.admin login account. https://developers.google.com/+/domains/authentication/delegation
All you then have to do is share the user calendars with the service account email address. You'll also need to store the p12 file that is required for security somewhere. (As it says in the last google documentation link.)
You can follow the steps I took to access the calendars in this post. I needed to create entries so you might need to play around with the different methods in the api documentation. Google API Calender v3 Event Insert via Service Account using Asp.Net MVC
Hope this helps, but again this is based on the understanding that it is only the application that needs access to the calendars, not the actual users.

- 1
- 1

- 156
- 2
- 8
Successfully set up the application using the javascript Used the REST method since the client libraries doesn't support the .Net version 3.5. Thanks for the help.

- 11
- 3