CalDAV is an extension of WebDAV that provides a standard for clients to access calendar information on a remote server.
Google provides a CalDAV interface that you can use to view and manage calendars using the CalDAV protocol.
The CalDAV API has the same quota limits as the Calendar API. For more information, see Usage limits.
Specifications
For each of the relevant specifications, Google's CalDAV support is as follows:
rfc4918: HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)
- Supports the HTTP methods
GET,PUT,HEAD,DELETE,POST,OPTIONS,PROPFIND, andPROPPATCH. - Doesn't support the HTTP methods
LOCK,UNLOCK,COPY,MOVE,MKCOL, or theIf*header (except forIf-Match). - Doesn't support arbitrary (user-defined) WebDAV properties.
- Doesn't support WebDAV Access Control (rfc3744).
- Supports the HTTP methods
rfc4791: Calendaring Extensions to WebDAV (CalDAV)
- Supports the HTTP method
REPORT. All reports exceptfree-busy-queryare implemented. - Doesn't support the HTTP method
MKCALENDAR. - Doesn't support the
AUDIOaction.
- Supports the HTTP method
-
- Data exposed in the CalDAV interface is formatted according to the iCalendar specification.
- Doesn't support
VTODOorVJOURNALdata. - Doesn't support the Apple iCal extension to allow user-settable URL properties.
rfc6578: Collection Synchronization for WebDAV
- Client applications must switch to this mode of operation after the initial sync.
rfc6638: Scheduling Extensions to CalDAV
- Supports a trivial "inbox," which is always empty.
- Invitations you receive are automatically delivered into your "events" collection rather than being placed into your "inbox."
- Doesn't support
free-busylookup.
caldav-ctag-02: Calendar Collection Entity Tag (CTag) in CalDAV
- The calendar
ctagis like a resourceetag; it changes when anything in the calendar has changed. This allows the client application to quickly determine that it doesn't need to synchronize any changed events.
- The calendar
calendar-proxy: Calendar User Proxy Functionality in CalDAV
- To improve calendar sync performance, requests that include the
calendar-proxy-read-fororcalendar-proxy-write-forproperties will fail with an iOS UserAgent because iOS devices don't support delegation.
- To improve calendar sync performance, requests that include the
Although our CalDAV implementation doesn't cover every specification, it works correctly for many clients, including Apple Calendar.
Create your client ID
To use the CalDAV API you need to have a Google Account.
Before you can send requests to the CalDAV API, you must register your client with the Google Cloud console by creating a project.
Go to the Google API Console. Click Create project, enter a name, and click Create.
You next need to activate the CalDAV API.
To enable an API for your project, do the following:
- Open the API Library in the Google API Console. If prompted, select a project or create a new one. The API Library lists all available APIs, grouped by product family and popularity.
- If the API you want to enable isn't visible in the list, use search to find it.
- Select the API you want to enable, then click the Enable button.
- If prompted, enable billing.
- If prompted, accept the API's Terms of Service.
To perform CalDAV API requests you need a Client ID and Client Secret.
To find your project's client ID and client secret, do the following:
- Select an existing OAuth 2.0 credential or open the Credentials page.
- If you haven't done so already, create your project's OAuth 2.0 credentials by clicking Create credentials > OAuth client ID, and providing the information needed to create the credentials.
- Look for the Client ID in the OAuth 2.0 client IDs section. For details, click the client ID.
Connect to Google's CalDAV server
To use the CalDAV interface, a client program initially connects with the
calendar server at one of two starting points. In either case, the connection
must be made over HTTPS and must use the OAuth
2.0 authentication scheme. The
CalDAV server refuses to authenticate a request unless it arrives over HTTPS
with OAuth 2.0 authentication of a Google Account. Attempting to connect over
HTTP or using Basic Authentication results in an HTTP 401 Unauthorized status
code.
If the client program (such as Apple's Calendar app) requires a principal collection as the starting point, the URI to connect to is:
https://apidata.googleusercontent.com/caldav/v2/CALENDAR_ID/user
Replace CALENDAR_ID with the ID of the calendar to be accessed.
To find the calendar ID through the web interface, select ** Calendar Settings** in the drop-down menu next to the calendar name. The calendar ID is shown in a section labeled Calendar Address. The calendar ID for a user's primary calendar is the same as that user's email address.
If a client program (such as Mozilla Thunderbird) requires a calendar collection as the starting point, use the following URI:
https://apidata.googleusercontent.com/caldav/v2/CALENDAR_ID/events