Search code examples
androidgoogle-calendar-apigoogle-oauth

Getting Google Calendar events with API V3 without using OAuth


I'm developing an Android app that uses a service to read Google Calendar events. It is working (not as desired) with Google Calendar API v2 (that is deprecated) and now I'm trying to implement the Google Calendar API v3.

I've been following this sample (http://samples.google-api-java-client.googlecode.com/hg/calendar-android-sample/instructions.html) but now I've realized that I don't need to use OAUTH2.0 in this application. I don't want to ask permissions to the app user to access their Google calendar, I want to show calendar events from a common calendar.

In Google Calendar API V2 I could just use the private calendar URL like this:

https://www.google.com/calendar/feeds/{EMAIL}/private-{MAGIC-COOKIE}/basic

Can anyone tell me if it is possible to still use the same calendar URL to just read the events without using OAUTH?


Solution

  • What you are looking for is a Service account. Service accounts let you set up a standard calender that all of your users will use. Its diffrent then the normal OAuth the users wont be asked permission to access there own account. They will be accessing your applications account.

    Here is a link that should get you started.
    https://developers.google.com/accounts/docs/OAuth2ServiceAccount