لتحسين أداء مزامنة التقويم من أجهزة iOS التي لا تتيح التفويض، لن ينجح استخدام السمتَين calendar-proxy-read-for أو calendar-proxy-write-for مع UserAgent لنظام التشغيل iOS.
لم نقدّم بعد تنفيذًا كاملاً لجميع المواصفات ذات الصلة. ومع ذلك، بالنسبة إلى العديد من البرامج، مثل تطبيق "التقويم" من Apple، من المفترض أن يعمل بروتوكول CalDAV بشكل صحيح.
ملاحظة: لأسباب تتعلّق بأمان الحساب ومنع إساءة الاستخدام، قد تضبط Google ملفات تعريف الارتباط على تطبيقات العميل التي تصل إلى البيانات من خلال CalDAV.
إنشاء معرّف العميل
لاستخدام CalDAV API، يجب أن يكون لديك حساب على Google.
إذا كان لديك حساب يمكنك استخدامه، تكون قد انتهيت من عملية إعداد حسابك.
قبل إرسال طلبات إلى CalDAV API، يجب تسجيل عميلك في وحدة تحكّم Google API من خلال إنشاء مشروع.
افتح "مكتبة واجهات برمجة التطبيقات" في "وحدة تحكّم Google API". إذا طُلب منك ذلك، اختَر مشروعًا أو أنشئ مشروعًا جديدًا. تعرض "مكتبة واجهات برمجة التطبيقات" جميع واجهات برمجة التطبيقات المتاحة، ويتم تجميعها حسب فئة المنتج ومدى رواجها.
إذا لم تظهر واجهة برمجة التطبيقات التي تريد تفعيلها في القائمة، استخدِم البحث للعثور عليها.
اختَر واجهة برمجة التطبيقات التي تريد تفعيلها، ثم انقر على الزر تفعيل.
فعِّل الفوترة إذا طُلب منك ذلك.
إذا طُلب منك ذلك، اقبل بنود خدمة واجهة برمجة التطبيقات.
إذا لم يسبق لك ذلك، أنشئ بيانات اعتماد OAuth 2.0 لمشروعك من خلال النقر على إنشاء بيانات اعتماد > معرّف عميل OAuth، وقدِّم المعلومات اللازمة لإنشاء بيانات الاعتماد.
ابحث عن معرّف العميل في قسم معرّفات العميل لبروتوكول OAuth 2.0.
للاطّلاع على التفاصيل، انقر على معرّف العميل.
الاتصال بخادم CalDAV من Google
لاستخدام واجهة CalDAV، يتصل برنامج العميل في البداية بخادم التقويم عند إحدى نقطتَي البداية التاليتَين. في كلتا الحالتين، يجب إجراء الاتصال عبر HTTPS واستخدام مخطط المصادقة OAuth 2.0. سيرفض خادم CalDAV مصادقة أي طلب ما لم يتم إرساله عبر HTTPS مع مصادقة OAuth 2.0 لحساب Google.
تؤدي محاولة الاتصال عبر HTTP أو استخدام المصادقة الأساسية إلى ظهور رمز حالة HTTP 401 Unauthorized.
إذا كان برنامج العميل (مثل تطبيق "التقويم" من Apple) يتطلّب مجموعة أساسية كنقطة بداية، يكون معرّف الموارد المنتظم (URI) المطلوب للربط هو:
يجب استبدال calid بـ "رقم تعريف التقويم" الذي سيتم الوصول إليه. يمكنك العثور على هذا الخيار من خلال واجهة الويب الخاصة بـ "تقويم Google" باتّباع الخطوات التالية: في القائمة المنسدلة بجانب اسم التقويم، اختَر إعدادات التقويم. في الصفحة الناتجة، يظهر معرّف التقويم في قسم بعنوان عنوان التقويم. معرّف التقويم الرئيسي للمستخدم هو نفسه عنوان البريد الإلكتروني الخاص بهذا المستخدم.
إذا كان برنامج العميل (مثل
Mozilla Sunbird) يتطلّب
مجموعة تقاويم كنقطة بداية، يكون معرّف الموارد المنتظم (URI) المطلوب للاتصال هو:
تم إيقاف نقطة النهاية القديمة https://www.google.com/calendar/dav نهائيًا، ولا ننصح باستخدامها.
ننصحك بالانتقال إلى تنسيق نقطة النهاية الجديد الموضّح أعلاه.
تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# CalDAV API Developer's Guide\n\nCalDAV is an extension of WebDAV that provides a standard for clients to access\ncalendar information on a remote server.\n\nGoogle provides a CalDAV interface that you can use to view and manage calendars\nusing the CalDAV protocol.\n\nSpecifications\n--------------\n\nFor each of the relevant specifications, Google's CalDAV support is as follows:\n\n- [rfc4918: HTTP Extensions for Web Distributed Authoring and Versioning\n (WebDAV)](http://tools.ietf.org/html/rfc4918)\n - Supports the HTTP methods `GET`, `PUT`, `HEAD`, `DELETE`, `POST`, `OPTIONS`, `PROPFIND` and `PROPPATCH`.\n - Does not support the HTTP methods `LOCK`, `UNLOCK`, `COPY`, `MOVE`, or `MKCOL`, or the `If*` header (except for `If-Match`).\n - Does not support arbitrary (user-defined) WebDAV properties.\n - Does not support WebDAV Access Control (rfc3744).\n- [rfc4791: Calendaring Extensions to WebDAV (CalDAV)](http://tools.ietf.org/html/rfc4791)\n - Supports the HTTP method `REPORT`. All reports except free-busy-query are implemented.\n - Does not support the HTTP method `MKCALENDAR`.\n - Does not support the `AUDIO` action.\n- [rfc5545: iCalendar](http://tools.ietf.org/html/rfc5545)\n - Data exposed in the CalDAV interface is formatted according to the iCalendar specification.\n - Does not currently support `VTODO` or `VJOURNAL` data.\n - Does not support the Apple iCal® extension to allow user-settable URL properties.\n- [rfc6578: Collection Synchronization for WebDAV](http://tools.ietf.org/html/rfc6578)\n - Client applications must switch to this mode of operation after the initial sync.\n- [rfc6638: Scheduling Extensions to CalDAV](http://tools.ietf.org/html/rfc6638)\n - Supports a trivial \"inbox,\" which is always empty.\n - Invitations you receive are automatically delivered into your \"events\" collection rather than being placed into your \"inbox.\"\n - Does not support free-busy lookup.\n- [caldav-ctag-02: Calendar Collection Entity Tag (CTag) in CalDAV](https://trac.calendarserver.org/browser/CalendarServer/trunk/doc/Extensions/caldav-ctag.txt)\n - The calendar `ctag` is like a resource `etag`; it changes when anything in the calendar has changed. This allows the client application to quickly determine that it does not need to synchronize any changed events.\n- [calendar-proxy: Calendar User Proxy Functionality in CalDAV](https://github.com/apple/ccs-calendarserver/blob/master/doc/Extensions/caldav-proxy.txt)\n - To improve the performance of calendar synching from iOS devices, which don't support delegation, using the `calendar-proxy-read-for` or `calendar-proxy-write-for` properties with an iOS UserAgent will fail.\n\nWe have not yet provided a full implementation of all of the relevant\nspecifications. However, for many clients such as Apple's Calendar app\nthe CalDAV protocol should interoperate correctly.\n\nNote: For account security and to prevent abuse, Google\nmight set cookies on client applications that access data via CalDAV.\n\nCreating your client ID\n-----------------------\n\nTo use the CalDAV API you need to have\na [Google Account](https://www.google.com/accounts/NewAccount).\nIf you already have an account you can use, then you're all set.\n\nBefore you can send requests to the CalDAV API, you must register\nyour client with the [Google API Console](https://console.cloud.google.com/) by creating a project.\n\n\nGo to the [Google API Console](https://console.cloud.google.com/project). Click **Create project** ,\nenter a name, and click **Create**.\nThe next step is to activate **CalDAV API** .\n\nTo enable an API for your project, do the following:\n\n1. [Open the API Library](https://console.cloud.google.com/apis/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.\n2. If the API you want to enable isn't visible in the list, use search to find it.\n3. Select the API you want to enable, then click the **Enable** button.\n4. If prompted, enable billing.\n5. If prompted, accept the API's Terms of Service.\n\nTo perform **CalDAV API** requests you will need **Client ID** and **Client Secret** .\n\nTo find your project's client ID and client secret, do the following:\n\n1. Select an existing OAuth 2.0 credential or open the [Credentials page](https://console.cloud.google.com/apis/credentials).\n2. If you haven't done so already, create your project's OAuth 2.0 credentials by clicking **Create credentials \\\u003e OAuth client ID**, and providing the information needed to create the credentials.\n3. Look for the **Client ID** in the **OAuth 2.0 client IDs** section. For details, click the client ID.\n\n\u003cbr /\u003e\n\nConnecting to Google's CalDAV server\n------------------------------------\n\nTo use the CalDAV interface, a client program initially connects with the\ncalendar server at one of two starting points. In either case, the connection\nmust be made over HTTPS and must use the [OAuth 2.0](/workspace/calendar/auth)\nauthentication scheme. The CalDAV server will refuse to authenticate a request\nunless it arrives over HTTPS with OAuth 2.0 authentication of a Google account.\nAttempting to connect over HTTP or using Basic Authentication results in an HTTP\n`401 Unauthorized` status code.\n\nIf the client program (such as Apple's Calendar app) requires a\nprincipal collection as the starting point, the URI to connect to is: \n\n```\nhttps://apidata.googleusercontent.com/caldav/v2/calid/user\n```\n\nWhere \u003cvar class=\"apiparam\" translate=\"no\"\u003ecalid\u003c/var\u003e should be replaced by the\n\"calendar ID\" of the calendar to be accessed. This can be found through the\nGoogle Calendar web interface as follows: in the pull-down menu next to the\ncalendar name, select **Calendar Settings** . On the resulting page\nthe calendar ID is shown in a section labeled **Calendar\nAddress**. The calendar ID for a user's primary calendar is the same as\nthat user's email address.\n\nIf a client program (such as\n[Mozilla Sunbird](http://www.mozilla.org/projects/calendar/sunbird/)) requires a\ncalendar collection as the starting point, the URI to connect to is: \n\n```\nhttps://apidata.googleusercontent.com/caldav/v2/calid/events\n```\n\n\nThe old endpoint **https://www.google.com/calendar/dav** is\ndeprecated and no longer supported; use it at your own risk.\nWe recommend you transition to the new endpoint format described above.\n\n\niCal® is a trademark of Apple Inc.\n\n\u003cbr /\u003e"]]