0

I'm creating a web app to see some events in a public calendar and want to get the attendee list from an event list in a calendar with a simple API call. In my use case, I can't ask the user to go through the Google login window. Is there a way to get the attendee list other than using OAuth authorisation and why is it hidden in a simple API call in a public calendar? (that does not make any sense)

Apern
  • 15
  • 2
  • 6
  • Could you give a bit more context on what your application does? Depending on the context different things may be acceptable – Martí Mar 05 '21 at 12:03
  • @Martí I am developing an application allowing to consult the programming calendar of a WebTV. It is simply a calendar of one week which indicates the times of the various emissions. I would like to be able to consult the attendees at each event so that I can indicate who is participating in each emission. – Apern Mar 05 '21 at 17:29

2 Answers2

3

If GCalendar doesn't allow access without user login, you have to create your own source providing this data. You can make, for instance, a simple HTTP API with nodeJS. Get the event information with your OAuth, feed your API with this data and make it available through an endpoint.

Take a look at this:

Accessing Google Calendar API from Node server

Danilo Setra
  • 54
  • 1
  • 2
  • This answer works great for all fields except attendees. – mary Mar 07 '21 at 19:05
  • What happens with attendees? Do you have access to this data? – Danilo Setra Mar 13 '21 at 17:22
  • 1
    The attendees field will be missing from the response when you're using either (1) an API key with no auth or (2) a service account without domain-wide delegation. You have to act as a user to get attendees, either by authorizing them directly with 3-legged oauth or by using a service account to impersonate them with domain-wide delegation. – mary Mar 13 '21 at 17:45
  • Yea, the ideal would be having access to this data and logging in with the user with permissions. Without access or login it's a bit complicated... – Danilo Setra Mar 13 '21 at 17:51
0

You can't.

See https://developers.google.com/calendar/v3/reference/events#resource

attendees[]
The attendees of the event. See the Events with attendees guide for more information on scheduling events with other calendar users. Service accounts need to use domain-wide delegation of authority to populate the attendee list.

Though other fields are accessible to any client, attendees are only available to an authenticated user or a service account using domain-wide delegation authority to impersonate one. Attendees will be omitted from the response if you're using an API key or a service account JWT alone.

mary
  • 702
  • 4
  • 11