Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Calendar Api, Is meeting Room available?

How do you list availability of a spacific calendar resource(Room) for a specific DateTime? Like if I want to list all Today's events for meeting Room(across all user accounts events that have booked meeting room for today), which google calendar api call can give me that? I get the Room details from Google Calendar Resource api but can't get all events booked for that room by different accounts, Appriciate it if you can help

like image 595
Ella Avatar asked Nov 19 '15 07:11

Ella


People also ask

How do I know if a meeting room is available in Google Calendar?

View Resources When Creating an EventToward the right side, click Rooms, etc. Hold your mouse over any scheduled events to see more information (information may vary depending on your level of access to the calendar) or click directly on an available time in the calendar to update the date/time of your event.

Why are rooms unavailable in Google Calendar?

Situations where Calendar doesn't release roomsHolds a room that's booked directly on the room's calendar. Lasts longer than 3 hours.

Does Google have a room scheduling tool?

If you manage a shared space, like a conference room or basketball court, you can create a calendar for the space and let people book time in it.


2 Answers

You will need to be authenticated as a user that has read-access to the room. Then you can take the resourceEmail field of the Calendar Resource API and use it as a calendarId in the events.list() Calendar API call.

like image 166
luc Avatar answered Sep 21 '22 19:09

luc


You can use freebusy API method for check if meeting room is available. Sample request:

POST https://www.googleapis.com/calendar/v3/freeBusy?fields=calendars&key={YOUR_API_KEY}

{
 "timeMin": "2018-10-18T06:30:00Z",
 "timeMax": "2018-10-18T17:00:00Z",
 "items": [
  {
   "id": "%CONFERENCE_ROOM Email ID%"
  }
 ],
 "timeZone": "GMT"
}

Sample response:

{
 "calendars": {
  "%CONFERENCE_ROOM Email ID%": {
   "busy": [
    {
     "start": "2018-10-18T07:45:00Z",
     "end": "2018-10-18T09:15:00Z"
    },
    // ...
   ]
  }
 }
}

Here you can play with Calendar API Explorer.

like image 45
NHG Avatar answered Sep 23 '22 19:09

NHG