0

I have created a credential by google developer console using client id(native application) from my google account (xxx@gmail.com). when I run the application a browser opens which ask for login details. now if I login with ABC@gmail.com then my client application gives event details for ABC@gmail.com.

Why it ask again login details if client ID and client secret is save on my machine. Is it possible that to retrieve information without saving client Id?

In short what I want is when user logs in to his/her gmail account I want all the calendars details with all events and not specific to user's calendar only.

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
Pritesh Chhunchha
  • 179
  • 1
  • 2
  • 15
  • This is a duplicate question to [this issue here.](http://stackoverflow.com/questions/13851157/oauth2-and-google-api-access-token-expiration-time) – Vaelen Feb 16 '16 at 06:56

1 Answers1

0

Registering your application in Google developer console using a native application will require that the user Authenticate to their Google account in order to access their Google calendar information.

If you want to give them access to one of your Google calendar then you create service account credentials in the Google developer console. Take the service account email address and add it as a user on the Calendar you want to access.

Once you have granted the service account permissions to the calendar anyone that access your application will then have access to the calendar without having to authenticate using there Google account.

Native client id is for accessing someone elses data. Service accounts are for accessing data that you the developer own.

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449