1
votes

It seems that Google Calendar's freeBusy method will not accept timeMin/timeMax ranges beyond two months or so. How am I supposed to find Free/Busy information for the range of the calendar between now and forever (or a distant point in the future)?

Request:

{
  "items": [
    {
      "id": "MY_GMAIL_CALENDAR_ID"
    }
  ],
  "timeMin": "2015-09-19T00:00:00-04:00", // today
  "timeMax": "2016-09-19T00:00:00-04:00" // 1 year from now
}

Response:

{
 "error": {
  "errors": [
   {
    "domain": "calendar",
    "reason": "timeRangeTooLong",
    "message": "The requested time range is too long.",
    "locationType": "parameter",
    "location": "timeMax"
   }
  ],
  "code": 400,
  "message": "The requested time range is too long."
 }
}
1
you can send multiple requests for the individual time ranges that add up to "forever"luc

1 Answers

2
votes

Currently the maximum time range for a free busy query is around 3 months, but that value is subject to change without warning. Instead, a best practice is to a use a reasonable small range (like one month) and execute multiple queries if you need to get free/busy information over a longer time period.