0
votes

I'm extending a PHP application that allows managers to create events and assign specific users to those events. Before the user is listed as available to be assigned, however, I run a check against the user's calendar to see if they are available.

I've already built this once for Exchange using EWS and making use of FindItem method to retrieve events in a given timeframe for a user's email address, but I'm having trouble finding an equivalent in the Google Calendar API.

Both Events and FreeBusy Calls seem to require the specific user's calendarId, which is fine for retrieving the active authenticated manager's Calendar information, but not for their users, of which only the email address is currently available to my system.

Is there a way to retrieve events or a calendarId for a user based on a valid Google email address? (Or is there a better way to get other user's FreeBusy status that I've completely overlooked in my research?)

1

1 Answers

0
votes

The Calendar API is a REST API that can be accessed through explicit HTTP calls or via the Google Client Libraries. However, please note that all requests to the Google Calendar API must be authorized by an authenticated user.

User's calendar list can be obtained through HTTP request:

GET https://www.googleapis.com/calendar/v3/users/me/calendarList/calendarId

Code examples for supported programming languages can be found in CalendarList: get.