0
votes

ridiculously simple question that i just can't seem to find any answer to:

i have, via oauth2 3 legged authentication, the userId + accessToken + refreshToken to access a google user's calendar scope.

now, i want to list all of that user's calendars.

the google calendar api reference (https://developers.google.com/google-apps/calendar/v3/reference/) talks about calendarList, which sounds great... but...

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

this is 3 legged oauth, there is no browser with a cookie storing some kind of google identifier for the "me" to work with. i need to specify the userId, the email account - something to identify the user whose calendars i want to list!

is there no way to do this most trivial basic use case?

this question (OAuth2/Google CalDAV - List of calendars for user) is a duplicate, and the self-answered comment link describes a solution based on v2 of calendar with something called propfind and dav, of which i know nothing. really? no rest?

tsk tsk google. tsk.

1

1 Answers

0
votes

well it really is as trivial and stupid as i thought it should be: the access_token contains the user information in it... sending the access_token in the Authrization: Bearer header does the trick.