Early ad break notification v1
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
- 광고 시점이 생성되는 해당 라이브 스트림의 식별자입니다. 이 식별자는 다음 중 하나일 수 있습니다.
- 라이브 스트림의 '애셋 키'입니다.
- 라이브 스트림의 '맞춤 애셋 키'로, 자체 식별자 문자열을 지정하여 자체 키 공간을 관리할 수 있습니다.
- 라이브 스트림의 '콘텐츠 소스 ID' 및 '콘텐츠 ID'입니다.
참고: 이 식별자 유형을 사용 설정해야 합니다. 자세한 내용은 계정 관리자에게 문의하세요.
- 다음 광고 시점의 예상 기간입니다. 재생 시간은 실제 광고 시점 길이에 최대한 가깝게 설정해야 합니다.
이러한 필수 입력란 외에도 맞춤 타겟팅 매개변수, 적용할 광고 모음 템플릿의 이름 또는 SCTE35 Cue Out 데이터(있는 경우)를 전송할 수도 있습니다.
기본 요건
EABN API를 사용하려면 서비스 계정을 만들고 Google Ad Manager 네트워크에 계정을 추가해야 합니다.
서비스 계정 만들기
EABN API를 호출할 서비스 계정을 만들려면 다음 단계를 완료하세요. - Google Cloud 계정이 있는 경우 IAM 모듈을 사용하여 서비스 계정을 만듭니다. 자세한 내용은 서비스 계정 만들기 및 관리를 참고하세요. - Google Cloud 계정이 없는 경우 다음 단계에 따라 Google API 콘솔에서 계정을 만드세요.
- 새 프로젝트를 만들거나 기존 프로젝트를 선택합니다.
- 사용자 인증 정보 페이지에서 서비스 계정 관리를 클릭합니다.
- 서비스 계정 페이지에서 서비스 계정 만들기를 클릭합니다.
- 서비스 계정 만들기 페이지에서 계정 세부정보를 입력합니다. 그런 다음 만들기를 클릭합니다.
서비스 계정을 만든 후 인증에 사용되는 계정의 JSON 키를 복사합니다.
API 사용 설정
서비스 계정을 만든 후 계정 관리자에게 다음 정보를 제공하여 계정에 API를 사용 설정합니다.
- Google Cloud 계정 이메일 주소
- 서비스 계정
- Google Ad Manager 네트워크의 네트워크 코드입니다.
계정 관리자가 API를 사용 설정한 후 다음 단계를 완료하여 API를 사용 설정합니다.
- Google API 라이브러리에서 'Google Ad Manager Video API'를 검색합니다.
- 사용 설정을 클릭합니다.
참고: API가 검색 결과에 표시되지 않으면 계정 관리자에게 문의하여 계정에 DAI API가 사용 설정되어 있는지 확인하세요.
API 사용
JSON/REST 요청을 사용하여 EABN API를 호출할 수 있습니다.
승인
EABN API를 승인된 방식으로 호출하려면 서비스 계정의 JSON 키와 범위 https://www.googleapis.com/auth/video-ads
를 사용하여 OAuth2 서비스 계정 사용자 인증 정보를 생성해야 합니다. 자세한 내용은 서버 간 애플리케이션에서 OAuth 2.0 사용하기를 참고하세요.
EABN API를 호출할 때마다 결과 인증 토큰을 Auth 헤더로 포함해야 합니다.
조기 광고 시점 알림을 보내려면 라이브 스트림을 지정하는 방법에 따라 유효한 EABN URL 3개 중 하나에 POST 요청을 보냅니다. 다음 섹션에서는 URL의 차이점을 설명하고 요청 및 응답 예시를 제공합니다.
URL
조기 광고 시점 알림에는 세 가지 유효한 URL이 있습니다. 세 가지 유형을 모두 사용하여 광고 시점 (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
콘텐츠 소스 ID 및 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의 콘텐츠 소스 ID를 나타냅니다.
content_id
는 Google Ad Manager의 콘텐츠 ID를 나타냅니다.
참고: 지정된 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 큐 아웃에서 base64로 인코딩된 데이터입니다. 다음을 포함할 수 있습니다.
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
객체로 전송된 모든 매개변수와 생성된 광고 시점의 Google 전반에서 사용되는 표준 ID가 포함된 추가 name
필드가 포함됩니다. 이 필드는 다음 형식으로 반환됩니다.
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 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-21(UTC)
[[["이해하기 쉬움","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-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,["Using the Early Ad Break Notification API\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\nPrerequisites\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\nCreating 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\nAdding 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\nEnabling 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\nUsing the API\n\nYou can call the EABN API using JSON/REST requests.\n\nAuthorization\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\nSending 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\nURLs\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\nRequest 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\nExample requests\n\nCreate 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\nResponse 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\nExample 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\nList assigned Ad Breaks \n\n GET admanagervideo.googleapis.com/v1/networks/.../sources/.../content/.../adBreaks\n Content-Type: application/json\n Authorization: Bearer ...\n\nResponse 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\nExample response \n\n HTTP/1.1 200 OK\n {\n \"name\": \"networks/.../assets/.../adBreaks/1\",\n \"expectedDuration\": \"30s\",\n \"breakState\": \"BREAK_STATE_COMPLETE\"\n }"]]