Determining the URL of CalDAV Calendars

iCloud

  1. Go to your ~/Library/Calendars folder.
  2. 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.
  3. 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.

  1. Go the calendar settings page of the calendar you want to access
  2. 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.)
  3. 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

OwnCloud and NextCloud 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  

Get in touch

Comments