OAuth2/Google CalDAV - List of calendars for user

2019-05-24 08:19发布

I used to request caldav servers to give all defined calendars for a given user. That works with fruux/ownCloud(Sabre) and also GCalendar the classic method. The request is this:

method: PROPFIND  headers:Depth: 1  
urlstr:https://www.google.com/calendar/dav/{theUserName}@gmail.com/  
contentType:application/xml  
content:
<d:propfind xmlns:d="DAV:" xmlns:cs="http://calendarserver.org/ns/" xmlns:c="urn:ietf:params:xml:ns:caldav">  
  <d:prop>  
    <d:resourcetype />  
    <d:displayname />  
    <cs:getctag />  
    <c:supported-calendar-component-set />  
  </d:prop>  
</d:propfind>  

Moving to Google OAuth2 has different calls, the ulrstr: would something like https://apidata.googleusercontent.com/caldav/v2/{calid}/user
Here the 'calid' has to be a specific calendar [1] There iis said:

Where calid should be replaced by the "calendar ID" of the calendar to be accessed

The intension is to get all calendars for a user's account! So those calls will NOT help.

Any suggestion how to get them in the Google/CalDAV/V2 world?

Günter

See also: [1] https://developers.google.com/google-apps/calendar/caldav/v2/guide

0条回答
登录 后发表回答