Determining the URL of CalDAV Calendars
Apple Calendars
- Go to your ~/Library/Calendars folder.
- You will find a bunch of ID.caldav directories: each of these folders correspond to a calendar (or a set of of calendars) and contains either another directory or an Info.plist file. The Info.plist file stores the URL of the calendar.
- Open the Info.plist file of the calendar you are interested in and
look for:
- Title, which is the name of the calendar (so that you know whether this is the calendar you are really interested in).
- Principal URL, which is something in the form:
https://pXX-caldav.icloud.com/USER_ID/principal/
. (The principal URL is going to be the same for all your iCloud calendars.) - Calendar Path, which is something in the form:
USER_ID/calendars/CALENDAR_ID
If you are interested in the iCal link (for read-only subscriptions): open the
iCal application, go to the calendars list on the left, click on the share
icon and you will get a public address to share the calendar. You need to
replace the webcal
protocol with https
.
The URL of the calendar is then formed as follows:
Calendar-id | CALENDAR_ID |
Main url | https://pxx-caldav.icloud.com/USER_ID/calendars |
CalDAV url | https://pxx-caldav.icloud.com/USER_ID/calendars/CALENDAR_ID |
ICS | https://pxx-calendars.icloud.com/published/2/A_VERY_LONG_STRING |
(See: https://discussions.apple.com/thread/3414939?start=0&tstart=0 for a similar discussion.)
Google Calendar
Google makes it a bit easier to find the calendars’ URLs.
- Go the calendar settings page of the calendar you want to access
- Copy the Calendar ID, which, for the main calendar, is something like STRING@gmail.com or STRING@groups.google.com. (For the main calendar STRING is your username.)
- Copy also the iCal Private Address, which is something in the form: https://www.google.com/calendar/ical/USERNAME/private-SOMESTRING/basic.ics
The calendar URL is then formed as follows:
Calendar-id | STRING@gmail.com |
Main URL | https://www.google.com/calendar/dav |
CalDAV URL | https://www.google.com/calendar/dav/STRING@gmail.com |
ICS | https://www.google.com/calendar/ical/USERNAME/private-SOMESTRING/basic.ics |
OwnCloud and NextCloud
NextCloud and OwnCloud are two good choices if you want to host your own private cloud.
The calendars URLs are readily available from the web interface: you will find the calendar address by clicking on the gear at the bottom of the page when you visit a calendar. The ID of the calendar is the calendar name.
Calendar-id | CALENDAR_NAME |
Main URL | https://nextcloud-server-url/remote.php/caldav/calendars/USERID |
CalDAV URL | https://nextcloud-server-url/remote.php/caldav/calendars/USERID/CALENDAR_NAME |
ICS |