Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Bu sayfada, gerekli SOAP XML istek üstbilgileri ve yanıt olarak döndürülen üstbilgiler hakkında bilgi verilmektedir.
Gerekli İstek Başlıkları
Tüm API SOAP çağrılarında başlıkta bir <RequestHeader> öğesi bulunmalıdır. Bu öğe tüm hizmet WSDL'lerinde tanımlanır. İstemci kitaplıkları size
yöntemlerinden birini kullanarak sizin yerinize bu başlığı sizin için ekleyebilir. <RequestHeader> ile ilgili tüm öğelerin açıklamasını burada bulabilirsiniz:
Öğe
Açıklama
<networkCode>
Gönderilmekte olan ağın ağ kodu. NetworkService.getAllNetworks() ve NetworkService.makeTestNetwork() dışındaki tüm istekler için ağ kodları gereklidir.
Yalnızca hesap girişiniz için kullanılabilir olan ağ kodunu kullandığınızdan emin olun. Kodu, hesabınızın Google Ad Manager web sitesinde, Yönetici > Ağ Ayarları sayfasında "Ağ kodu"nun yanında bulabilirsiniz.
<applicationName>
Uygulamanızı tanımlayan rastgele bir dize adı. Bu durum Google'ın günlük dosyalarında gösterilir. Örneğin: "Envanterim
Uygulama" veya "Uygulama_1".
Not: Uygulamanızın Ad Manager API'sine gönderdiği her istek bir OAuth2 erişim jetonu içermelidir. Jetonu HTTP üstbilgisinde şu şekilde iletin: Authorization: Bearer YOUR_ACCESS_TOKEN.
Örnek İstek
Aşağıdaki kod, kök AdUnit adresini arayan getAdUnitsByStatement() işlevine yönelik bir SOAP istek çağrısı örneğidir.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 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```"]]