ctag تقویم مانند etag منبع است. زمانی که هر چیزی در تقویم تغییر کرده باشد تغییر می کند. این به برنامه مشتری اجازه می دهد تا به سرعت تشخیص دهد که نیازی به همگام سازی رویدادهای تغییر یافته ندارد.
برای بهبود عملکرد همگامسازی تقویم از دستگاههای iOS که از تفویض اختیار پشتیبانی نمیکنند، استفاده از ویژگیهای calendar-proxy-read-for یا calendar-proxy-write-for با یک UserAgent iOS ناموفق خواهد بود.
ما هنوز اجرای کامل تمام مشخصات مربوطه را ارائه نکرده ایم. با این حال، برای بسیاری از مشتریان مانند برنامه تقویم اپل، پروتکل CalDAV باید به درستی کار کند.
توجه: برای امنیت حساب و جلوگیری از سوء استفاده، Google ممکن است کوکیهایی را روی برنامههای سرویس گیرنده تنظیم کند که از طریق CalDAV به دادهها دسترسی دارند.
ایجاد شناسه مشتری شما
برای استفاده از CalDAV API باید یک حساب Google داشته باشید. اگر از قبل حسابی دارید که می توانید از آن استفاده کنید، پس همه چیز آماده است.
قبل از اینکه بتوانید درخواست ها را به CalDAV API ارسال کنید، باید مشتری خود را با ایجاد یک پروژه در Google API Console ثبت کنید.
به کنسول API Google بروید. روی ایجاد پروژه کلیک کنید، یک نام وارد کنید و روی ایجاد کلیک کنید.
مرحله بعدی فعال کردن CalDAV API است.
برای فعال کردن یک API برای پروژه خود، موارد زیر را انجام دهید:
کتابخانه API را در Google API Console باز کنید . در صورت درخواست، یک پروژه را انتخاب کنید یا یک پروژه جدید ایجاد کنید. کتابخانه API همه API های موجود را فهرست می کند که بر اساس خانواده محصول و محبوبیت گروه بندی شده اند.
اگر API مورد نظر برای فعال کردن در لیست قابل مشاهده نیست، از جستجو برای پیدا کردن آن استفاده کنید.
API را که می خواهید فعال کنید انتخاب کنید، سپس روی دکمه Enable کلیک کنید.
در صورت درخواست، صورتحساب را فعال کنید.
اگر از شما خواسته شد، شرایط سرویس API را بپذیرید.
برای انجام درخواستهای CalDAV APIبه Client ID و Client Secret نیاز دارید.
برای پیدا کردن شناسه مشتری و رمز مشتری پروژه خود، موارد زیر را انجام دهید:
اگر قبلاً این کار را انجام نداده اید، اعتبارنامه OAuth 2.0 پروژه خود را با کلیک کردن روی ایجاد اعتبار > شناسه مشتری OAuth و ارائه اطلاعات مورد نیاز برای ایجاد اعتبارنامه ایجاد کنید.
به دنبال شناسه مشتری در بخش شناسه های مشتری OAuth 2.0 بگردید. برای جزئیات، روی شناسه مشتری کلیک کنید.
اتصال به سرور CalDAV گوگل
برای استفاده از رابط CalDAV، یک برنامه کلاینت ابتدا در یکی از دو نقطه شروع به سرور تقویم متصل می شود. در هر صورت، اتصال باید از طریق HTTPS انجام شود و باید از طرح احراز هویت OAuth 2.0 استفاده کند. سرور CalDAV از احراز هویت درخواستی خودداری می کند مگر اینکه درخواست از طریق HTTPS با احراز هویت OAuth 2.0 یک حساب Google وارد شود. تلاش برای اتصال از طریق HTTP یا استفاده از احراز هویت اولیه منجر به کد وضعیت 401 Unauthorized می شود.
اگر برنامه مشتری (مانند برنامه تقویم اپل) به یک مجموعه اصلی به عنوان نقطه شروع نیاز دارد، URI برای اتصال به این صورت است:
جایی که calid باید با "شناسه تقویم" تقویمی که باید به آن دسترسی داشت جایگزین شود. این را می توان از طریق رابط وب Google Calendar به شرح زیر پیدا کرد: در منوی کشویی کنار نام تقویم، تنظیمات تقویم را انتخاب کنید. در صفحه حاصل، شناسه تقویم در بخشی با عنوان آدرس تقویم نشان داده شده است. شناسه تقویم برای تقویم اصلی کاربر با آدرس ایمیل آن کاربر یکسان است.
اگر یک برنامه مشتری (مانند 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"]]