संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
इवेंट के संसाधनों में होने वाले बदलावों पर नज़र रखें.
अनुरोध
एचटीटीपी अनुरोध
POST https://www.googleapis.com/calendar/v3/calendars/calendarId/events/watch
पैरामीटर
पैरामीटर का नाम
मान
ब्यौरा
पाथ पैरामीटर
calendarId
string
कैलेंडर आइडेंटिफ़ायर. कैलेंडर आईडी पाने के लिए, calendarList.list तरीके को कॉल करें. अगर आपको लॉग इन किए हुए उपयोगकर्ता का प्राइमरी कैलेंडर ऐक्सेस करना है, तो "primary" कीवर्ड का इस्तेमाल करें.
ज़रूरी नहीं क्वेरी पैरामीटर
eventTypes
string
देखने के लिए रिसॉर्स के इवेंट टाइप. ज़रूरी नहीं. अलग-अलग तरह के संसाधन देखने के लिए, इस पैरामीटर को कई बार दोहराया जा सकता है. अगर यह सेट नहीं है, तो सभी तरह के इवेंट दिखाए जाते हैं.
इन वैल्यू का इस्तेमाल किया जा सकता है:
"birthday": पूरे दिन चलने वाले खास इवेंट, जो साल में एक बार होते हैं.
"default": नियमित इवेंट.
"focusTime": फ़ोकस टाइम इवेंट.
"fromGmail": Gmail के इवेंट.
"outOfOffice": 'अभी मैं छुट्टी पर हूं' इवेंट.
"workingLocation": काम करने की जगह की जानकारी से जुड़े इवेंट.
अनुमति देना
इस अनुरोध में, इनमें से कम से कम एक स्कोप के साथ अनुमति देने की सुविधा है:
यूयूआईडी या ऐसी ही कोई यूनीक स्ट्रिंग जो इस चैनल की पहचान करती है.
token
string
इस चैनल से भेजी गई हर सूचना के साथ, टारगेट पते पर डिलीवर की जाने वाली कोई भी स्ट्रिंग. ज़रूरी नहीं.
type
string
इस चैनल के लिए डिलीवरी का इस्तेमाल किया जाने वाला तरीका. मान्य वैल्यू "web_hook" (या "webhook") हैं. दोनों वैल्यू, ऐसे चैनल के बारे में बताती हैं जहां मैसेज डिलीवर करने के लिए एचटीटीपी अनुरोधों का इस्तेमाल किया जाता है.
address
string
वह ईमेल पता जहां इस चैनल की सूचनाएं भेजी जाती हैं.
params
object
डिलीवरी चैनल के व्यवहार को कंट्रोल करने वाले अन्य पैरामीटर. ज़रूरी नहीं.
params.ttl
string
सूचना चैनल के लिए, सेकंड में टीटीएल. डिफ़ॉल्ट रूप से, यह 6,04,800 सेकंड होता है.
जवाब
अगर एपीआई सही से जुड़ जाता है, तो यह तरीका इस स्ट्रक्चर के साथ रिस्पॉन्स बॉडी दिखाता है:
[null,null,["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[],[],null,["# Events: watch\n\n| **Note:** [Authorization](#auth) optional.\n\nWatch for changes to Events resources.\n\nRequest\n-------\n\n### HTTP request\n\n```\nPOST https://www.googleapis.com/calendar/v3/calendars/calendarId/events/watch\n```\n\n### Parameters\n\n| Parameter name | Value | Description |\n|----------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Path parameters** |||\n| `calendarId` | `string` | Calendar identifier. To retrieve calendar IDs call the [calendarList.list](/workspace/calendar/api/v3/reference/calendarList/list) method. If you want to access the primary calendar of the currently logged in user, use the \"`primary`\" keyword. |\n| **Optional query parameters** |||\n| `eventTypes` | `string` | Event types of resources to watch. Optional. This parameter can be repeated multiple times to watch resources of different types. If unset, returns all event types. \u003cbr /\u003e \u003cbr /\u003e Acceptable values are: - \"`birthday`\": Special all-day events with an annual recurrence. - \"`default`\": Regular events. - \"`focusTime`\": Focus time events. - \"`fromGmail`\": Events from Gmail. - \"`outOfOffice`\": Out of office events. - \"`workingLocation`\": Working location events. |\n\n### Authorization\n\nThis request allows authorization with at least one of the following scopes:\n\n| Scope |\n|-------------------------------------------------------------------|\n| `https://www.googleapis.com/auth/calendar.readonly` |\n| `https://www.googleapis.com/auth/calendar` |\n| `https://www.googleapis.com/auth/calendar.events.readonly` |\n| `https://www.googleapis.com/auth/calendar.events` |\n| `https://www.googleapis.com/auth/calendar.app.created` |\n| `https://www.googleapis.com/auth/calendar.events.freebusy` |\n| `https://www.googleapis.com/auth/calendar.events.owned` |\n| `https://www.googleapis.com/auth/calendar.events.owned.readonly` |\n| `https://www.googleapis.com/auth/calendar.events.public.readonly` |\n\nFor more information, see the [authentication and authorization](/workspace/guides/configure-oauth-consent) page.\n\n### Request body\n\nIn the request body, supply data with the following structure:\n\n```carbon\n{\n \"id\": string,\n \"token\": string,\n \"type\": string,\n \"address\": string,\n \"params\": {\n \"ttl\": string\n }\n}\n```\n\n| Property name | Value | Description | Notes |\n|---------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------|\n| `id` | `string` | A UUID or similar unique string that identifies this channel. | |\n| `token` | `string` | An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. | |\n| `type` | `string` | The type of delivery mechanism used for this channel. Valid values are \"`web_hook`\" (or \"`webhook`\"). Both values refer to a channel where Http requests are used to deliver messages. | |\n| `address` | `string` | The address where notifications are delivered for this channel. | |\n| `params` | `object` | Additional parameters controlling delivery channel behavior. Optional. | |\n| params.`ttl` | `string` | The time-to-live in seconds for the notification channel. Default is 604800 seconds. | |\n\nResponse\n--------\n\nIf successful, this method returns a response body with the following structure:\n\n```text\n{\n \"kind\": \"api#channel\",\n \"id\": string,\n \"resourceId\": string,\n \"resourceUri\": string,\n \"token\": string,\n \"expiration\": long\n}\n```\n\n| Property name | Value | Description | Notes |\n|---------------|----------|-------------------------------------------------------------------------------------------------------------------|-------|\n| `kind` | `string` | Identifies this as a notification channel used to watch for changes to a resource, which is \"`api#channel`\". | |\n| `id` | `string` | A UUID or similar unique string that identifies this channel. | |\n| `resourceId` | `string` | An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. | |\n| `resourceUri` | `string` | A version-specific identifier for the watched resource. | |\n| `token` | `string` | An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. | |\n| `expiration` | `long` | Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. | |"]]