1
votes

Google calendar REST API GET method (https://developers.google.com/calendar/v3/reference/events/get) should return this structure (https://developers.google.com/calendar/v3/reference/events#resource), unless I'm missing something.

I need to get event title and description to use in my application. I 'm getting below response instead.

I've tried to change event visibility (public/private) and availability (free/busy). Actually, API does not show events with Free availability, for which I don't have solution either.

Here is event edit screen screenshot: https://www.screencast.com/t/X8bRS8kJDT

{
   "kind":"calendar#event",
   "etag":"\"3145149995624000\"",
   "id":"5fnlvcl2msab46p8roqbahhb6g",
   "status":"confirmed",
   "htmlLink":"https://www.google.com/calendar/event?eid=NWZubHZjbDJtc2FiNDZwOHJvcWJhaGhiNmcgZWQtYWRtaW4uY29tXzMwOHNycjdzdjdiM28xazRpdjZ2cm9mb3Y0QGc",
   "updated":"2019-11-01T02:23:17.812Z",
   "start":{
      "dateTime":"2019-11-11T09:30:00+11:00"
   },
   "end":{
      "dateTime":"2019-11-11T10:00:00+11:00"
   },
   "visibility":"private",
   "iCalUID":"[email protected]"
}

Are there other methods to get calendar events details with REST API, including ones with free availability?

Thanks.

04/02/2020: I actually made it work for "ordinary" Google account - add project, add API, add service account and allocate service account email to the calendar. But I still not sure how to change access level for G Suite account. It allows only to see Free/Busy status.

I've changed default access in Admin Console as this article suggests, but it does not help: https://www.macworld.com/article/2980005/the-mystery-of-the-unsharable-google-apps-calendar.html

1

1 Answers

0
votes

You could try specifying the fields you want to retrieve like the image below:

enter image description here

Or you could put a " * " as the image below to retrieve all values:

enter image description here

fields is a standard Query parameter, which specifies what values you want to include in your response. To learn more about it, you can check Here.