हम Data API को अपडेट कर रहे हैं, ताकि यह Shorts पर मिले व्यू की गिनती करने के तरीके से मेल खा सके.
ज़्यादा जानें
Activities: insert
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
YouTube ने चैनल बुलेटिन की सुविधा बंद कर दी है. इसलिए, अब इस तरीके का इस्तेमाल नहीं किया जा सकता.
ज़्यादा जानकारी के लिए, कृपया
YouTube सहायता केंद्र पर जाएं.
यह कुकी, किसी चैनल के लिए बुलेटिन पोस्ट करती है. (अनुरोध सबमिट करने वाले व्यक्ति के पास, चैनल की ओर से कार्रवाई करने की अनुमति होनी चाहिए.)
ध्यान दें: भले ही, activity
रिसॉर्स में ऐसी कार्रवाइयों के बारे में जानकारी शामिल हो सकती है जैसे कि किसी उपयोगकर्ता ने वीडियो को रेटिंग दी है या उसे पसंदीदा के तौर पर मार्क किया है. हालांकि, आपको उन activity
रिसॉर्स को जनरेट करने के लिए, अन्य एपीआई तरीकों का इस्तेमाल करना होगा. उदाहरण के लिए, किसी वीडियो को रेटिंग देने के लिए एपीआई के videos.rate()
तरीके का इस्तेमाल किया जाता है. वहीं, किसी वीडियो को पसंदीदा के तौर पर मार्क करने के लिए playlistItems.insert()
तरीके का इस्तेमाल किया जाता है.
कोटे पर असर: इस तरीके को कॉल करने पर, 50 यूनिट का कोटा खर्च होता है.
अनुरोध
एचटीटीपी अनुरोध
POST https://www.googleapis.com/youtube/v3/activities
पैरामीटर
यहां दी गई टेबल में उन पैरामीटर के बारे में बताया गया है जो इस क्वेरी के साथ काम करते हैं. यहां दिए गए सभी पैरामीटर, क्वेरी पैरामीटर हैं.
पैरामीटर |
ज़रूरी पैरामीटर |
part |
string
इस ऑपरेशन में, part पैरामीटर दो काम करता है. इससे उन प्रॉपर्टी का पता चलता है जिन्हें राइट ऑपरेशन सेट करेगा. साथ ही, उन प्रॉपर्टी का भी पता चलता है जिन्हें एपीआई रिस्पॉन्स में शामिल किया जाएगा.
यहां दी गई सूची में, part नाम दिए गए हैं जिन्हें पैरामीटर वैल्यू में शामिल किया जा सकता है:
contentDetails
id
snippet
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य हिस्से में, गतिविधि का संसाधन उपलब्ध कराएं.
उस संसाधन के लिए:
जवाब
अगर यह तरीका काम करता है, तो जवाब के मुख्य हिस्से में गतिविधि संसाधन दिखता है.
गड़बड़ियां
यहां दी गई टेबल में, गड़बड़ी के उन मैसेज के बारे में बताया गया है जो इस तरीके को कॉल करने पर एपीआई दिखा सकता है. ज़्यादा जानकारी के लिए, कृपया गड़बड़ी के मैसेज का दस्तावेज़ देखें.
गड़बड़ी का टाइप |
गड़बड़ी की जानकारी |
ब्यौरा |
badRequest (400) |
bulletinTextRequired |
अनुरोध में, बुलेटिन पोस्ट के लिए टेक्स्ट देने के लिए, snippet ऑब्जेक्ट की description प्रॉपर्टी का इस्तेमाल करना ज़रूरी है. |
badRequest (400) |
invalidMetadata |
kind प्रॉपर्टी, दिए गए आईडी के टाइप से मेल नहीं खाती. |
forbidden (403) |
forbidden |
अनुरोध को सही तरीके से अनुमति नहीं दी गई है. |
notFound (404) |
playlistNotFound |
YouTube को वह वीडियो नहीं मिल रहा है जिसे आपको बुलेटिन पोस्ट से जोड़ना है. contentDetails.bulletinPosted.playlistId प्रॉपर्टी की वैल्यू देखें. |
notFound (404) |
videoNotFound |
YouTube को वह वीडियो नहीं मिल रहा है जिसे आपको बुलेटिन पोस्ट से जोड़ना है. contentDetails.bulletinPosted.videoId प्रॉपर्टी की वैल्यू देखें. |
userRateLimitExceeded (403) |
rateLimitExceeded |
आपका अनुरोध पूरा नहीं किया जा सकता, क्योंकि आपने कोटा पार कर लिया है. |
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-08-21 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-08-21 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eYouTube's channel bulletin feature has been deprecated and is no longer supported.\u003c/p\u003e\n"],["\u003cp\u003eCreating an activity requires authorization with specific scopes, such as \u003ccode\u003ehttps://www.googleapis.com/auth/youtube\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/youtube.force-ssl\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003epart\u003c/code\u003e parameter in the request specifies which properties will be modified and included in the API response, such as \u003ccode\u003econtentDetails\u003c/code\u003e, \u003ccode\u003eid\u003c/code\u003e, and \u003ccode\u003esnippet\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must include an activity resource, and it is required to provide a value for \u003ccode\u003esnippet.description\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis method call has a quota cost of 50 units, and exceeding the quota will result in a \u003ccode\u003euserRateLimitExceeded\u003c/code\u003e error.\u003c/p\u003e\n"]]],["The YouTube channel bulletin feature is deprecated. The API's `activities.insert` method allows posting to a channel. This requires authorization and has a quota cost of 50 units. You must provide `snippet.description` for the bulletin text in the request body. Key parameters include `part`, and the response returns an `activity` resource. Errors can occur due to bad requests, invalid metadata, authorization issues, or exceeding quota limits.\n"],null,["# Activities: insert\n\n**YouTube has deprecated the channel bulletin feature, and this method is no longer supported.** \n\nFor more details, please see the [YouTube Help Center](https://support.google.com/youtube?p=channel-bulletins).\nPosts a bulletin for a specific channel. (The user submitting the request must be authorized to act on the channel's behalf.) \n\n**Note:** Even though an `activity` resource can contain information about actions like a user rating a video or marking a video as a favorite, you need to use other API methods to generate those `activity` resources. For example, you would use the API's [videos.rate()](/youtube/v3/docs/videos/rate) method to rate a video and the [playlistItems.insert()](/youtube/v3/docs/playlistItems/insert) method to mark a video as a favorite.\n\n**Quota impact:** A call to this method has a [quota cost](/youtube/v3/getting-started#quota) of 50 units.\n\nRequest\n-------\n\n### HTTP request\n\n```\nPOST https://www.googleapis.com/youtube/v3/activities\n```\n\n### Authorization\n\nThis request requires authorization with at least one of the following scopes ([read more about authentication and authorization](/youtube/v3/guides/authentication)).\n\n| Scope |\n|-----------------------------------------------------|\n| `https://www.googleapis.com/auth/youtube` |\n| `https://www.googleapis.com/auth/youtube.force-ssl` |\n\n### Parameters\n\nThe following table lists the parameters that this query supports. All of the parameters listed are query parameters.\n\n| Parameters ||\n|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| **Required parameters** |||\n| `part` | `string` The **part** parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The following list contains the `part` names that you can include in the parameter value: - `contentDetails` - `id` - `snippet` |\n\n### Request body\n\nProvide an [activity resource](/youtube/v3/docs/activities#resource) in the request body.\nFor that resource:\n\n- You must specify a value for these properties:\n\n - `snippet.description`\n- You can set values for these properties:\n\n - `snippet.description`\n - `contentDetails.bulletin.resourceId`\n\nResponse\n--------\n\nIf successful, this method returns an [activity resource](/youtube/v3/docs/activities#resource) in the response body.\n\nErrors\n------\n\nThe following table identifies error messages that the API could return in response to a call to this method. Please see the [error message](/youtube/v3/docs/errors) documentation for more detail.\n\n| Error type | Error detail | Description |\n|-------------------------------|------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `badRequest (400)` | `bulletinTextRequired` | The request must use the `snippet` object's `description` property to provide the text for the bulletin post. |\n| `badRequest (400)` | `invalidMetadata` | The `kind` property does not match the type of ID provided. |\n| `forbidden (403)` | `forbidden` | The request is not properly authorized. |\n| `notFound (404)` | `playlistNotFound` | YouTube cannot find the video that you are trying to associate with the bulletin post. Check the value of the `contentDetails.bulletinPosted.playlistId` property. |\n| `notFound (404)` | `videoNotFound` | YouTube cannot find the video that you are trying to associate with the bulletin post. Check the value of the `contentDetails.bulletinPosted.videoId` property. |\n| `userRateLimitExceeded (403)` | `rateLimitExceeded` | The request cannot be completed because you have exceeded your [quota](/youtube/v3/getting-started#quota). |"]]