Reputation: 5393
I just want to get list of calendares, their owners, and their free/busy state.
I've added Service Account according to this guide, and I can get calendars from single user. But I want to do this domain-wide.
f = file('key.p12', 'rb')
key = f.read()
f.close()
credentials = SignedJwtAssertionCredentials('[email protected]',
key,
scope='https://www.googleapis.com/auth/calendar.readonly',
user_agent='bot',
sub='[email protected]') #I want calendars from everyone
http = httplib2.Http()
http = credentials.authorize(http)
service = build('calendar', 'v3', http=http)
lists = service.calendarList().list(pageToken=None).execute(http=http)
pprint.pprint(lists)
Upvotes: 0
Views: 67
Reputation: 1120
You'll need to also use the Directory API within the Admin SDK to pull a list of all users within the domain as per this.
Upvotes: 1