Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create an Out of office type Calendar Event via the REST API?

Google Calendar has a new event type called "Out of office" that automatically will decline any events it is placed over and others that come in during the scheduled time of the event.

I inspected one of these event objects via the API and briefly checked the Google Calendar API documentation to see if there was a way to create these programmatically. I work on a system that schedules events on people's calendars when they are going to be out of the office as all day events to provide visibility to the rest of the staff. I would like to change these to be true Out of office event types if its possible via the API.

like image 672
Kyle Hayes Avatar asked Jul 31 '18 16:07

Kyle Hayes


People also ask

Is Google Calendar API a REST API?

The Google Calendar API is a RESTful API that can be accessed through explicit HTTP calls or via the Google Client Libraries.

Is there a Google Calendar API?

Millions of people use Google Calendar to track their events. The Calendar API lets you integrate your app with Google Calendar, creating new ways for you to engage your users.


1 Answers

The short answer: It does not work currently (as of 05/2021)

The Google Calendar API currently exposes the eventType property as read-only. It will be discarded when sent in an insert payload.

eventType [string]: Specific type of the event. Read-only.

Possible values are:

  • "default" - A regular event or not further specified.
  • "outOfOffice" - An out-of-office event.

As mentioned by @ercliou in the comments, the ticket can be tracked here: issuetracker.google.com/issues/112063903

like image 77
bentocin Avatar answered Sep 28 '22 14:09

bentocin