-1

I am trying to fetch the user's calendar details from iCloud for rails application using the server URL (caldav.icloud.com) via calDav client. I tested with few accounts, and I was able get the calendar details successfully using this server URL. I want to confirm if I can access all calendars using this URL itself or is there any possibility that the server URL can vary ? BACK-END - RUBY ON RAILS

1 Answers1

2

Apple partially supports the CalDAV standard in their iCloud calendar. As far as I know, there is no official support - there is no information on the caldav support originating from Apple itself.

While it's possible to communicate with caldav.icloud.com using DAV, the calendars are having different URLs. A calendar-URLs in icloud looks like https://p12-caldav.icloud.com/17112341234/calendars/nameofthecalendar. Those numbers (p12 and 17112341234 in the example) will always be the same for all calendars owned by the same user.

To find those numbers, it's possible to do a PROPFIND on https://caldav.icloud.com asking for current_user_principal. Unfortunately I have no clue how to do that through Ruby. (I'm the maintainer of the Python caldav client library, so I know how to easily do this in Python though).

tobixen
  • 3,893
  • 1
  • 20
  • 20