이 페이지에서는 필수 SOAP XML 요청 헤더와 응답으로 반환되는 헤더에 대한 정보를 제공합니다.
필수 요청 헤더
모든 API SOAP 호출에는 헤더에 <RequestHeader> 요소가 있어야 합니다. 이 요소는 모든 서비스 WSDL에 정의되어 있습니다. 클라이언트 라이브러리는 제공하는 값을 사용하여 이 헤더를 자동으로 추가하는 메서드를 제공합니다. 다음은 <RequestHeader>의 모든 요소에 대한 설명입니다.
요소
설명
<networkCode>
주소를 지정하는 네트워크의 네트워크 코드입니다. NetworkService.getAllNetworks() 및 NetworkService.makeTestNetwork()를 제외한 모든 요청을 실행할 때 네트워크 코드가 필요합니다.
계정 로그인에 사용할 수 있는 네트워크 코드만 사용하세요. 계정의 Google Ad Manager 웹사이트에서 관리 > '네트워크 코드' 옆에 있는 네트워크 설정 페이지
<applicationName>
애플리케이션을 식별하는 임의의 문자열 이름입니다. 이는 Google의 로그 파일에 표시됩니다. 예를 들면 'My Inventory Application' 또는 'App_1'입니다.
참고: 애플리케이션에서 Ad Manager API로 전송하는 모든 요청에는 OAuth2 액세스 토큰이 포함되어야 합니다. 토큰을 Authorization: Bearer YOUR_ACCESS_TOKEN로 HTTP 헤더로 전달합니다.
요청 예
다음 코드는 루트 AdUnit를 찾는 getAdUnitsByStatement()에 대한 SOAP 요청 호출의 예입니다.
[null,null,["최종 업데이트: 2025-08-21(UTC)"],[[["\u003cp\u003eThis page outlines the required and returned SOAP XML headers when interacting with the Google Ad Manager API.\u003c/p\u003e\n"],["\u003cp\u003eAll API requests require a \u003ccode\u003eRequestHeader\u003c/code\u003e with \u003ccode\u003enetworkCode\u003c/code\u003e and \u003ccode\u003eapplicationName\u003c/code\u003e, along with an OAuth2 access token in the HTTP header.\u003c/p\u003e\n"],["\u003cp\u003eResponses from the API include a \u003ccode\u003eResponseHeader\u003c/code\u003e containing \u003ccode\u003erequestId\u003c/code\u003e and \u003ccode\u003eresponseTime\u003c/code\u003e for tracking and support purposes.\u003c/p\u003e\n"],["\u003cp\u003eThe API utilizes a document/literal wrapped style for SOAP communication.\u003c/p\u003e\n"]]],["SOAP API calls require a `\u003cRequestHeader\u003e` with a `\u003cnetworkCode\u003e` (except for specific network service requests) and an `\u003capplicationName\u003e`. Each request also needs an OAuth2 access token in the HTTP header. Example SOAP requests are given. Responses include `\u003crequestId\u003e` and `\u003cresponseTime\u003e` headers, which should be logged for troubleshooting. The API uses document/literal wrapped style SOAP. Example response code is given showing the header structure.\n"],null,["# SOAP XML Request and Response Headers\n\nThis page provides information on the required SOAP XML request headers, and the headers that are returned in response.\n| **Note:** The API uses document/literal wrapped style SOAP, not RPC/encoded style.\n\nRequired Request Headers\n------------------------\n\nAll API SOAP calls must have a `\u003cRequestHeader\u003e` element in the header; this element is defined in all the service WSDLs. The [client libraries](/ad-manager/api/clients) provide\nmethods to add this header for you, using the values that you supply. Here is a description of all the elements of `\u003cRequestHeader\u003e`:\n\n| Element | Description |\n|:--------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `\u003cnetworkCode\u003e` | The network code of the network being addressed. Network codes are required when making all requests except `NetworkService.getAllNetworks()` and `NetworkService.makeTestNetwork()`. Be sure that you only use a network code available to your account login. You can find the code on the Google Ad Manager website for your account, on the Admin \\\u003e Network Settings page next to \"Network code\". |\n| `\u003capplicationName\u003e` | An arbitrary string name identifying your application. This will be shown in Google's log files. For example: \"My Inventory Application\" or \"App_1\". |\n\n**Note:** Every request your application sends to the Ad Manager API must include an OAuth2 access token. Pass the token in the HTTP header as: `Authorization: Bearer YOUR_ACCESS_TOKEN`.\n\n**Example Request**\n\nThe following code is an example of a SOAP request call to `getAdUnitsByStatement()` looking for the root `AdUnit`. \n\n```world-of-warcraft-toc\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003csoapenv:Envelope\n xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"\n xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\u003e\n \u003csoapenv:Header\u003e\n \u003cns1:RequestHeader\n soapenv:actor=\"http://schemas.xmlsoap.org/soap/actor/next\"\n soapenv:mustUnderstand=\"0\"\n xmlns:ns1=\"https://www.google.com/apis/ads/publisher/v202508\"\u003e\n \u003cns1:networkCode\u003e123456\u003c/ns1:networkCode\u003e\n \u003cns1:applicationName\u003eDfpApi-Java-2.1.0-dfp_test\u003c/ns1:applicationName\u003e\n \u003c/ns1:RequestHeader\u003e\n \u003c/soapenv:Header\u003e\n \u003csoapenv:Body\u003e\n \u003cgetAdUnitsByStatement xmlns=\"https://www.google.com/apis/ads/publisher/v202508\"\u003e\n \u003cfilterStatement\u003e\n \u003cquery\u003eWHERE parentId IS NULL LIMIT 500\u003c/query\u003e\n \u003c/filterStatement\u003e\n \u003c/getAdUnitsByStatement\u003e\n \u003c/soapenv:Body\u003e\n\u003c/soapenv:Envelope\u003e\n```\n\n**Note:** If your SOAP request causes an `Unmarshalling error`, see [Common Errors](/ad-manager/api/troubleshooting#Unmarshalling) for troubleshooting tips.\n\nResponse Headers\n----------------\n\nAll responses returned from the API include the following header elements. As\na best practice, we recommend that you log these values.\n\n| Element | Description |\n|:---------------------|:--------------------------------------------------------------------------------------------------------------------------------------|\n| **\u003crequestId**`\u003e` | Uniquely identifies this request. If you have any support issues, sending us this ID will enable us to find your request more easily. |\n| **`\u003cresponseTime\u003e`** | Elapsed time between the web service receiving the request and sending the response. |\n\n**Example Response**\n\nThe following code shows an example of a SOAP response for the previous request. \n\n```actionscript-3\n\u003csoap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"\u003e\n \u003csoap:Header\u003e\n \u003cResponseHeader xmlns=\"https://www.google.com/apis/ads/publisher/v202508\"\u003e\n \u003crequestId\u003exxxxxxxxxxxxxxxxxxxx\u003c/requestId\u003e\n \u003cresponseTime\u003e1063\u003c/responseTime\u003e\n \u003c/ResponseHeader\u003e\n \u003c/soap:Header\u003e\n \u003csoap:Body\u003e\n \u003cgetAdUnitsByStatementResponse xmlns=\"https://www.google.com/apis/ads/publisher/v202508\"\u003e\n \u003crval\u003e\n \u003ctotalResultSetSize\u003e1\u003c/totalResultSetSize\u003e\n \u003cstartIndex\u003e0\u003c/startIndex\u003e\n \u003cresults\u003e\n \u003cid\u003e2372\u003c/id\u003e\n \u003cname\u003eRootAdUnit\u003c/name\u003e\n \u003cdescription\u003e\u003c/description\u003e\n \u003ctargetWindow\u003eTOP\u003c/targetWindow\u003e\n \u003cstatus\u003eACTIVE\u003c/status\u003e\n \u003cadUnitCode\u003e1002372\u003c/adUnitCode\u003e\n \u003cinheritedAdSenseSettings\u003e\n \u003cvalue\u003e\n \u003cadSenseEnabled\u003etrue\u003c/adSenseEnabled\u003e\n \u003cborderColor\u003eFFFFFF\u003c/borderColor\u003e\n \u003ctitleColor\u003e0000FF\u003c/titleColor\u003e\n \u003cbackgroundColor\u003eFFFFFF\u003c/backgroundColor\u003e\n \u003ctextColor\u003e000000\u003c/textColor\u003e\n \u003curlColor\u003e008000\u003c/urlColor\u003e\n \u003cadType\u003eTEXT_AND_IMAGE\u003c/adType\u003e\n \u003cborderStyle\u003eDEFAULT\u003c/borderStyle\u003e\n \u003cfontFamily\u003eDEFAULT\u003c/fontFamily\u003e\n \u003cfontSize\u003eDEFAULT\u003c/fontSize\u003e\n \u003c/value\u003e\n \u003c/inheritedAdSenseSettings\u003e\n \u003c/results\u003e\n \u003c/rval\u003e\n \u003c/getAdUnitsByStatementResponse\u003e\n \u003c/soap:Body\u003e\n\u003c/soap:Envelope\u003e\n```"]]