Early ad break notification v1
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
- उस लाइव स्ट्रीम का आइडेंटिफ़ायर जिसमें विज्ञापन के लिए ब्रेक बनाया जा रहा है. यह आइडेंटिफ़ायर इनमें से कोई एक हो सकता है:
- लाइव स्ट्रीम की “ऐसेट कुंजी”.
- लाइव स्ट्रीम का “कस्टम एसेट पासकोड”. इसकी मदद से, अपनी आइडेंटिफ़ायर स्ट्रिंग तय करके, अपना पासकोड मैनेज किया जा सकता है.
- लाइव स्ट्रीम का “कॉन्टेंट सोर्स आईडी” और “कॉन्टेंट आईडी”.
ध्यान दें: इस तरह के आइडेंटिफ़ायर का इस्तेमाल करने के लिए, आपके पास अनुमति होनी चाहिए. ज़्यादा जानकारी के लिए, अपने खाता मैनेजर से संपर्क करें.
- अगले विज्ञापन के लिए ब्रेक की अनुमानित अवधि. विज्ञापन के लिए ब्रेक की अवधि, असल अवधि के जितना हो सके उतना होनी चाहिए.
इन ज़रूरी फ़ील्ड के अलावा, कस्टम टारगेटिंग पैरामीटर, लागू करने के लिए विज्ञापन पॉड टेंप्लेट का नाम या SCTE35 क्यू आउट डेटा भी भेजा जा सकता है. हालांकि, यह डेटा उपलब्ध होने पर ही भेजा जा सकता है.
ज़रूरी शर्तें
EABN API का इस्तेमाल करने के लिए, आपको एक सेवा खाता बनाना होगा और खाते को अपने Google Ad Manager नेटवर्क में जोड़ना होगा.
सेवा खाता बनाया जा रहा है
EABN API को कॉल करने के लिए सेवा खाता बनाने के लिए, यह तरीका अपनाएं: - अगर आपके पास Google Cloud खाता है, तो सेवा खाता बनाने के लिए IAM मॉड्यूल का इस्तेमाल करें. ज़्यादा जानकारी के लिए, सेवा खाते बनाना और मैनेज करना लेख पढ़ें. - अगर आपके पास Google Cloud खाता नहीं है, तो Google API Console से खाता बनाने के लिए यह तरीका अपनाएं:
- नया प्रोजेक्ट बनाएं या कोई मौजूदा प्रोजेक्ट चुनें.
- क्रेडेंशियल पेज पर, सेवा खाते मैनेज करें पर क्लिक करें.
- सेवा खाते पेज पर, सेवा खाता बनाएं पर क्लिक करें.
- सेवा खाता बनाएं पेज पर, खाते की जानकारी डालें. इसके बाद, बनाएं पर क्लिक करें.
सेवा खाता बनाने के बाद, खाते की JSON कुंजी कॉपी करें. इसका इस्तेमाल पुष्टि करने के लिए किया जाता है.
एपीआई को चालू करना
सेवा खाता बनाने के बाद, अपने खाते के लिए एपीआई चालू करने के लिए, अपने खाता मैनेजर को यह जानकारी दें:
- आपके Google Cloud खाते का ईमेल पता
- आपका सेवा खाता
- आपके Google Ad Manager नेटवर्क का नेटवर्क कोड.
आपके खाता मैनेजर के एपीआई चालू करने के बाद, एपीआई चालू करने के लिए यह तरीका अपनाएं:
- Google API लाइब्रेरी में, “Google Ad Manager Video API” खोजें.
- चालू करें पर क्लिक करें.
ध्यान दें: अगर खोज के नतीजों में एपीआई नहीं दिखता है, तो अपने खाता मैनेजर से संपर्क करके पुष्टि करें कि आपके खाते को DAI API के लिए चालू किया गया है.
एपीआई का इस्तेमाल करना
JSON/REST अनुरोधों का इस्तेमाल करके, EABN API को कॉल किया जा सकता है.
अनुमति देना
EABN API को अनुमति वाले कॉल करने के लिए, आपको अपने सेवा खाते की JSON कुंजी और दायरे https://www.googleapis.com/auth/video-ads
का इस्तेमाल करके, OAuth2 सेवा खाते के क्रेडेंशियल जनरेट करने होंगे. ज़्यादा जानकारी के लिए, सर्वर से सर्वर ऐप्लिकेशन के लिए OAuth 2.0 का इस्तेमाल करना लेख पढ़ें.
आपको EABN API को किए जाने वाले हर कॉल के लिए, अनुमति वाले टोकन को Auth हेडर के तौर पर शामिल करना होगा.
विज्ञापन के लिए ब्रेक की सूचना पहले भेजने के लिए, तीन मान्य ईएबीएन यूआरएल में से किसी एक पर पोस्ट अनुरोध भेजें. यह इस बात पर निर्भर करता है कि आपको लाइव स्ट्रीम की जानकारी कैसे देनी है. यहां दिए गए सेक्शन में, यूआरएल के बीच के अंतर के बारे में बताया गया है. साथ ही, अनुरोध और जवाब के उदाहरण भी दिए गए हैं.
यूआरएल
विज्ञापन के लिए ब्रेक की सूचना देने वाले तीन मान्य यूआरएल हैं. विज्ञापन के लिए ब्रेक (POST
) बनाने या असाइन किए गए विज्ञापन के लिए ब्रेक की सूची (GET
) पाने के लिए, तीनों तरह के ब्रेक का इस्तेमाल किया जा सकता है.
लाइव स्ट्रीम के ऐसेट पासकोड का इस्तेमाल करने के लिए, इनका इस्तेमाल करें:
POST admanagervideo.googleapis.com/v1/networks/{network_code}/assets/{asset_key}/adBreaks
GET admanagervideo.googleapis.com/v1/networks/{network_code}/assets/{asset_key}/adBreaks
लाइव स्ट्रीम की कस्टम ऐसेट कुंजी का इस्तेमाल करने के लिए, इनका इस्तेमाल करें:
POST admanagervideo.googleapis.com/v1/networks/{network_code}/customAssets/{custom_asset_key}/adBreaks
GET admanagervideo.googleapis.com/v1/networks/{network_code}/customAssets/{custom_asset_key}/adBreaks
कॉन्टेंट सोर्स आईडी और Content ID के तरीके का इस्तेमाल करने के लिए, इनका इस्तेमाल करें:
POST admanagervideo.googleapis.com/v1/networks/{network_code}/sources/{content_source_id}/content/{content_id}/adBreaks
GET admanagervideo.googleapis.com/v1/networks/{network_code}/sources/{content_source_id}/content/{content_id}/adBreaks
सभी पैरामीटर के लिए:
network_code
, आपके Google Ad Manager नेटवर्क का नेटवर्क कोड दिखाता है.
asset_key
, लाइव स्ट्रीम की जानकारी वाले पेज पर दिखाई गई एसेट कुंजी को दिखाता है.
custom_asset_key
, आपकी लाइव स्ट्रीम की कस्टम एसेट कुंजी दिखाता है.
content_source_id
, Google Ad Manager में कॉन्टेंट सोर्स का आईडी दिखाता है.
content_id
, Google Ad Manager में किसी कॉन्टेंट के आईडी को दिखाता है.
ध्यान दें: तय किया गया content_source_id
/content_id
पेयर, Google Ad Manager में किसी लाइव स्ट्रीम से जुड़ा होना चाहिए.
अनुरोध का मुख्य हिस्सा - इसका इस्तेमाल सिर्फ़ विज्ञापन के लिए ब्रेक बनाने के लिए किया जाता है (POST)
ऑब्जेक्ट |
expectedDuration
| ज़रूरी है | विज्ञापन के लिए ब्रेक की अवधि, Google के स्टैंडर्ड फ़ॉर्मैट में दी गई हो. जैसे, xx.xxxs, जहां xx.xxx सेकंड की संख्या है |
customParams
| वैकल्पिक | AM360 में कस्टम ज़रूरी शर्तों के आधार पर टारगेटिंग के लिए, इस ब्रेक के विज्ञापन अनुरोधों में शामिल किए जाने वाले की-वैल्यू पेयर. इन्हें
=
और इसमें
&
. उदाहरण:
key=value&key2=value2,value3
टारगेटिंग के बारे में ज़्यादा जानने के लिए, अपनी स्ट्रीम में टारगेटिंग पैरामीटर की वैल्यू दें लेख पढ़ें.
|
podTemplateName
| वैकल्पिक | विज्ञापन पॉड टेंप्लेट का नाम |
scte35CueOut
| वैकल्पिक | scte35 क्यू आउट से Base-64 में कोड में बदला गया डेटा. इसमें ये शामिल हो सकते हैं
splice_insert()
या
time_signal()
निर्देश दें. उदाहरण: |
अनुरोध के उदाहरण
POST admanagervideo.googleapis.com/v1/networks/.../sources/.../content/.../adBreaks
Content-Type: application/json
Authorization: Bearer …
{
"expectedDuration": "30s",
"scte35CueOut": "/DA0AAAAAAAA///wBQb+cr0AUAAeAhxDVUVJSAAAjn/PAAGlmbAICAAAAAAsoKGKNAIAmsnRfg==",
"customParams": "param1=value1¶m2=value2",
"podTemplateName": "podtemplate"
}
जवाब का मुख्य भाग
रिस्पॉन्स बॉडी में, adBreak
ऑब्जेक्ट में भेजे गए सभी पैरामीटर के साथ-साथ एक अतिरिक्त name
फ़ील्ड भी होता है. इस फ़ील्ड में, बनाए गए विज्ञापन के ब्रेक का Google-वाइड स्टैंडर्ड आईडी होता है. यह फ़ील्ड इस फ़ॉर्मैट में दिखता है:
networks/{network_code}/assets/{asset_key}/adBreaks/{ad_break_id}
जवाब का उदाहरण
HTTP/1.1 200 OK
{
"name": "networks/.../assets/.../adBreaks/1",
"expectedDuration": "30s",
"scte35CueOut": "/DA0AAAAAAAA///wBQb+cr0AUAAeAhxDVUVJSAAAjn/PAAGlmbAICAAAAAAsoKGKNAIAmsnRfg==",
"customParams": "param1=value1¶m2=value2",
"podTemplateName": "podtemplate"
}
GET admanagervideo.googleapis.com/v1/networks/.../sources/.../content/.../adBreaks
Content-Type: application/json
Authorization: Bearer …
जवाब का मुख्य भाग
रिस्पॉन्स बॉडी में, स्ट्रीम के लिए असाइन किए गए हर विज्ञापन के लिए एक अतिरिक्त breakState
फ़ील्ड के साथ विज्ञापन के लिए ब्रेक होते हैं. breakState
फ़ील्ड में ये वैल्यू इस्तेमाल की जा सकती हैं:
// Ad break decisioning has started.
BREAK_STATE_DECISIONED
// Break has started to be delivered to end users.
BREAK_STATE_COMPLETE
जवाब का उदाहरण
HTTP/1.1 200 OK
{
"name": "networks/.../assets/.../adBreaks/1",
"expectedDuration": "30s",
"breakState": "BREAK_STATE_COMPLETE"
}
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को 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\u003eThe Early Ad Break Notification (EABN) API enables you to inform Google Ad Manager about upcoming ad breaks in live streams, including metadata, up to an hour in advance.\u003c/p\u003e\n"],["\u003cp\u003eTo use the EABN API, you must create a service account, add it to your Google Ad Manager network, and have the API enabled by your account manager.\u003c/p\u003e\n"],["\u003cp\u003eThe API requires the live stream identifier (asset key, custom asset key, or content source ID with content ID) and the expected ad break duration.\u003c/p\u003e\n"],["\u003cp\u003eYou can optionally include custom targeting parameters, an ad pod template name, and SCTE35 Cue Out data with your EABN requests.\u003c/p\u003e\n"],["\u003cp\u003eEABN requests are immutable, and subsequent requests for the same event are rejected until the break appears in the event's manifest.\u003c/p\u003e\n"]]],[],null,["# Early ad break notification v1\n\nUsing the Early Ad Break Notification API\n-----------------------------------------\n\n- The identifier of the corresponding live stream to which the ad break is being created. This identifier can be one of the following:\n- The \"Asset Key\" of the live stream.\n- The \"Custom Asset Key\" of the live stream, which allows you to manage your own key space by specifying your own identifier string.\n- The \"Content Source ID\" and the \"Content ID\" of the live stream.\n\nNote: You must be enabled to use this identifier type. For more information, contact your account manager.\n\n- The expected duration of the next ad break. The duration needs to be as close to the actual ad break length as possible.\n\nIn addition to these required fields, you can also send custom targeting parameters, the name of an ad pod template to apply, or SCTE35 Cue Out data, if available.\n\n### Prerequisites\n\nIn order to use the EABN API, you must create a service account and add the account to your Google Ad Manager network.\n\n#### Creating a service account\n\nTo create a service account for calling the EABN API, complete the following steps: - If you have a Google Cloud account, use the IAM module to create a service account. For more information, see [Creating and managing service accounts](//cloud.google.com/iam/docs/creating-managing-service-accounts). - If you do not have a Google Cloud account, complete the following steps to create one from the [Google API Console](//console.developers.google.com/apis/credentials/):\n\n1. Create a new project or select an existing project.\n2. In the **Credentials** page, click **Manage service accounts**.\n3. In the **Service accounts** page, click **CREATE SERVICE ACCOUNT**.\n4. In the **Create Service account** page, enter the account details. Then, click **CREATE**.\n\nOnce you have created a service account, copy the account's JSON key, which is used for authentication.\n\n#### Adding your service account to your Google Ad Manager network\n\nTo add your service account to your network, complete the steps in [Add a service account user for API access](//support.google.com/admanager/answer/6078734).\n\n### Enabling the API\n\nOnce you have created the service account, provide the following information to your account manager to enable the API for your account:\n\n- Your Google Cloud Account email address\n- Your service account\n- The Network Code of your Google Ad Manager Network.\n\nAfter the API has been enabled by your account manager, complete the following steps to enable the API:\n\n1. In the [Google API library](//console.developers.google.com/apis/library), search for \"Google Ad Manager Video API\".\n2. Click **ENABLE**.\n\nNote: If the API does not appear in the search results, contact your account manager to confirm that your account has been enabled for the DAI API.\n\n### Using the API\n\nYou can call the EABN API using JSON/REST requests.\n\n#### Authorization\n\nTo make authorized calls to the EABN API, you need to generate OAuth2 service account credentials using the JSON key from your service account and the scope `https://www.googleapis.com/auth/video-ads`. For more information, see [Using OAuth 2.0 for Server to Server Applications](https://developers.google.com/identity/protocols/oauth2/service-account).\n\nYou must include the resulting authorization token as an Auth header for each call to the EABN API.\n\n#### Sending an early ad break notification\n\nTo send an early ad break notification, send a POST request to one of the three valid EABN URLs, depending on how you prefer to specify the live stream. The following sections explain the differences between the URLs and provide request and response examples.\n\n##### URLs\n\nThere are three valid URLs for early ad break notification. You can use all three types to create an ad break (`POST`) or get the list of assigned ad breaks (`GET`).\n\nTo use the asset key of a live stream, use: \n\n POST admanagervideo.googleapis.com/v1/networks/{network_code}/assets/{asset_key}/adBreaks\n\n GET admanagervideo.googleapis.com/v1/networks/{network_code}/assets/{asset_key}/adBreaks\n\nTo use the custom asset key of a live stream, use: \n\n POST admanagervideo.googleapis.com/v1/networks/{network_code}/customAssets/{custom_asset_key}/adBreaks\n\n GET admanagervideo.googleapis.com/v1/networks/{network_code}/customAssets/{custom_asset_key}/adBreaks\n\nTo use the Content Source ID and Content ID approach, use: \n\n POST admanagervideo.googleapis.com/v1/networks/{network_code}/sources/{content_source_id}/content/{content_id}/adBreaks\n\n GET admanagervideo.googleapis.com/v1/networks/{network_code}/sources/{content_source_id}/content/{content_id}/adBreaks\n\nFor all the parameters:\n\n- `network_code` represents the network code of your Google Ad Manager network.\n- `asset_key` represents the asset key shown in your live stream details page.\n- `custom_asset_key` represents the custom asset key of your live stream.\n- `content_source_id` represents the id of a content source in Google Ad Manager.\n- `content_id` represents the id of a piece of content in Google Ad Manager.\n\nNote: The specified `content_source_id`/`content_id` pair must be associated with a live stream in Google Ad Manager.\n\n##### Request body - only used to create an Ad Break (POST)\n\n\u003cbr /\u003e\n\n| Object |||\n| \u003cbr /\u003e `expectedDuration` \u003cbr /\u003e | Required | The duration of this ad break, using Google's standard duration format (xx.xxxs where xx.xxx is the number of seconds) |\n| \u003cbr /\u003e `customParams` \u003cbr /\u003e | Optional | Key-value pairs to be included on ad requests for this break for custom criteria targeting in AM360, separated by \u003cbr /\u003e `=` and joined by `&` . Example: `key=value&key2=value2,value3` \u003cbr /\u003e For more information on targeting, see [Supply targeting parameters to your stream](//support.google.com/admanager/answer/7320899). |\n| \u003cbr /\u003e `podTemplateName` \u003cbr /\u003e | Optional | The ad pod template name |\n| \u003cbr /\u003e `scte35CueOut` \u003cbr /\u003e | Optional | Base-64-encoded data from the scte35 cue out. Can include the \u003cbr /\u003e `splice_insert()` or `time_signal()` command. Examples: - time_signal(): \u003cbr /\u003e `/DA0AAAAAAAA///wBQb+cr0AUAAeAhxDVUVJSAAAjn/PAAGlmbAICAAAAAAsoKGKNAIAmsnRfg==` \u003cbr /\u003e - splice_insert(): \u003cbr /\u003e `/DAvAAAAAAAA///wFAVIAACPf+/+c2nALv4AUsz1AAAAAAAKAAhDVUVJAAABNWLbowo=` \u003cbr /\u003e |\n|----------------------------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\n\u003cbr /\u003e\n\n### Example requests\n\n##### Create an Ad Break\n\n POST admanagervideo.googleapis.com/v1/networks/.../sources/.../content/.../adBreaks\n Content-Type: application/json\n Authorization: Bearer ...\n {\n \"expectedDuration\": \"30s\",\n \"scte35CueOut\": \"/DA0AAAAAAAA///wBQb+cr0AUAAeAhxDVUVJSAAAjn/PAAGlmbAICAAAAAAsoKGKNAIAmsnRfg==\",\n \"customParams\": \"param1=value1¶m2=value2\",\n \"podTemplateName\": \"podtemplate\"\n }\n\n###### Response body\n\nThe response body contains all of the parameters sent in the `adBreak` object, as well as an additional `name` field, which contains the Google-wide standard ID of the created ad break. This field is returned in the following format: \n\n networks/{network_code}/assets/{asset_key}/adBreaks/{ad_break_id}\n\n###### Example response\n\n HTTP/1.1 200 OK\n {\n \"name\": \"networks/.../assets/.../adBreaks/1\",\n \"expectedDuration\": \"30s\",\n \"scte35CueOut\": \"/DA0AAAAAAAA///wBQb+cr0AUAAeAhxDVUVJSAAAjn/PAAGlmbAICAAAAAAsoKGKNAIAmsnRfg==\",\n \"customParams\": \"param1=value1¶m2=value2\",\n \"podTemplateName\": \"podtemplate\"\n }\n\n##### List assigned Ad Breaks\n\n GET admanagervideo.googleapis.com/v1/networks/.../sources/.../content/.../adBreaks\n Content-Type: application/json\n Authorization: Bearer ...\n\n###### Response body\n\nThe response body contains the ad breaks with an additional `breakState` field for each ad break assigned to the stream. `breakState` field supports the following values: \n\n // Ad break decisioning has started.\n BREAK_STATE_DECISIONED\n\n // Break has started to be delivered to end users.\n BREAK_STATE_COMPLETE\n\n###### Example response\n\n HTTP/1.1 200 OK\n {\n \"name\": \"networks/.../assets/.../adBreaks/1\",\n \"expectedDuration\": \"30s\",\n \"breakState\": \"BREAK_STATE_COMPLETE\"\n }"]]