常見錯誤
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本頁說明 Google Ad Manager API 最常傳回的錯誤。錯誤會以 Error.REASON
格式傳回:
EntityChildrenLimitReachedError
- 摘要
- 實體已達實體允許的子項數量上限,因此該實體無法再新增子項。
- 建議處理秘訣
- 建立達到子項數量上限的新實體類型,並將您要建立的子實體新增至新的實體。舉例來說,如果您收到 LINE_ITEM_LIMIT_FOR_ORDER_REACHED,就必須建立新的訂單,並將您嘗試建立的委刊項加入這個新訂單中。
QuotaError.EXCEEDED_QUOTA
- 摘要
- 每秒提出的要求數量過高,已超過允許的上限。
- 建議處理秘訣
-
- 請使用 updateLineItems 等批次方法,在本機收集變更,然後提出單一要求來同時完成這些變更。
- 請等待約 5 秒鐘,然後再重試要求。請注意,這不保證要求一定會成功。如果再次失敗,請嘗試增加等待時間。這項建議適用於即時與 Ad Manager 整合的互動式應用程式。
- 針對 Ad Manager 聯播網,請將要求限制為每秒 2 次,Ad Manager 360 聯播網則為每秒 8 次。再次提醒您,這並不保證每個要求都能成功,但可能有助於減少收到此錯誤的次數。我們建議針對整合不到即時互動功能的 Ad Manager 應用程式使用,例如執行夜間報表。
AuthenticationError.GOOGLE_ACCOUNT_ALREADY_ASSOCIATED_WITH_NETWORK
- 摘要
- 使用者嘗試使用已與網路建立關聯的帳戶建立測試網路。
- 常見原因
- 使用者在呼叫
NetworkService.makeTestNetwork()
前未建立新的 Google 帳戶。
- 建議處理秘訣
- 請先建立一個全新的帳戶,再呼叫
NetworkService.makeTestNetwork()
。詳情請參閱如何建立測試網路。
AuthenticationError.NETWORK_CODE_REQUIRED
- 摘要
- 使用者未提供
networkCode
。如要傳送要求,必須提供網路代碼。
- 常見原因
- 除了
NetworkService.getAllNetworks()
和 NetworkService.makeTestNetwork()
之外,所有要求都必須提供網路代碼。
- 建議處理秘訣
- 在要求標頭中加入要處理的網路代碼。只能使用您登入帳戶時可用的聯播網代碼。您可以在 Ad Manager 網站的 Ad Manager 網站中找到帳戶的程式碼,只要前往「管理」>「聯播網設定」頁面,即可在「聯播網代碼」旁找到。如要進一步瞭解如何設定聯播網代碼,請參閱 SOAP XML 要求和回應標頭頁面。
AuthenticationError.NETWORK_NOT_FOUND
- 摘要
- 在伺服器上找不到設定中提供的網路代碼,因此無法提出要求。
- 常見原因
- 您在設定中指定的網路代碼有誤。
- 建議處理秘訣
- 錯誤記錄的「觸發」欄位通常會建議使用者正確的網路。
AuthenticationError.NO_NETWORKS_TO_ACCESS
- 摘要
- 使用者未與任何網路建立關聯。
- 常見原因
- 您尚未為正式版帳戶啟用 API 存取權。
- 建議處理秘訣
- 啟用實際工作環境的 API 存取權。詳情請參閱啟用 API 存取權。
AuthenticationError.NOT_WHITELISTED_FOR_API_ACCESS
- 摘要
- 客戶尚未列入 API 存取權的許可清單中。
- 常見原因
- 您的聯播網未列入正式版的許可清單,但您在 SOAP 標頭中提供網路代碼。
-
- 建議處理秘訣
- 啟用 API 存取權。
-
PermissionError.PERMISSION_DENIED
- 摘要
- 使用者沒有要求的必要權限。
- 常見原因
-
- 您嘗試存取的物件位於其他網路中。
- 您嘗試存取的是網路中的物件,但權限不足,無法讀取或更新。
- 您嘗試執行的工作需要在帳戶中啟用額外功能。
- 建議處理秘訣
-
- 如要建立 UI,請告知使用者他們沒有執行這項操作的權限,因此可以洽詢管理員。
- 如果您嘗試執行工作 (例如涉及這項僅限付費功能),但您的網路沒有權限執行的工作,請與客戶經理聯絡,瞭解如何啟用這項功能。
- 請注意,測試聯播網預設為而非 Ad Manager 360 聯播網,也就是說,這些聯播網沒有 Ad Manager 360 聯播網中的付費功能。如要在測試網路中啟用功能,請與客戶經理聯絡。
ApiVersionError.UPDATE_TO_NEWER_VERSION
- 摘要
- 應用程式:啟動需要較新版本才能成功的要求;或是向已淘汰版本發出的要求。
- 常見原因
-
- API 呼叫的版本已淘汰。歡迎訂閱我們的網誌,查看淘汰公告。
- 您提出的要求需要新版 API 才能成功。這類情況通常是使用者介面已引入某項功能,而為了讓 API 正確傳送物件,就需要新版 API。
- 建議處理秘訣
-
- 隨時掌握 API 版本;規劃定期升級。
- 訂閱我們的網誌,即可收到淘汰通知。
404 錯誤
- 摘要
- 伺服器未送達您的要求。
- 常見原因
- 你的網際網路連線或 Proxy 設定可能有誤,系統可能也會停用您要呼叫的 API 版本。
-
- 建議處理秘訣
- 檢查網際網路或 Proxy 設定,並確定您使用的是最新版本的 API。您可能也想將用戶端程式庫升級至最新版本。
-
- 預防秘訣
- 歡迎訂閱 Ad Manager API 論壇並瀏覽我們的網誌,隨時掌握 Ad Manager API 最新消息。
取消包裝錯誤
- 摘要
- 要求中的 SOAP XML 不符合 WSDL 規格。
- 常見原因
- 要求含有 WSDL 規格中未包含的欄位或實體,或位於錯誤的命名空間中。
-
- 要求中有類型不符 (例如,整數欄位含有字串值)。
-
- 建議處理秘訣
- 請確認要求符合 WSDL 規格。
-
- 使用用戶端程式庫產生有效的 SOAP,並用來進行比較。所有用戶端程式庫都支援記錄 SOAP 要求和回應。
-
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-21 (世界標準時間)。
[null,null,["上次更新時間:2025-08-21 (世界標準時間)。"],[[["\u003cp\u003eThis page lists common Google Ad Manager API errors and offers troubleshooting tips.\u003c/p\u003e\n"],["\u003cp\u003eErrors are categorized by type, such as authentication, permission, and quota errors.\u003c/p\u003e\n"],["\u003cp\u003eEach error description includes a summary, common causes, and recommended handling tips.\u003c/p\u003e\n"],["\u003cp\u003eUsers are encouraged to stay updated on API versions and subscribe to the Ad Manager API forum and blog for the latest news.\u003c/p\u003e\n"],["\u003cp\u003eUtilizing client libraries for generating valid SOAP requests is recommended to avoid unmarshalling errors.\u003c/p\u003e\n"]]],[],null,["# Common Errors\n\nThis page describes the most frequently encountered errors returned by the\nGoogle Ad Manager API. Errors are returned in the format\n`Error.REASON`:\n\n- [`EntityChildrenLimitReachedError`](#EntityChildrenLimitReachedError)\n- [`QuotaError.EXCEEDED_QUOTA`](#QuotaError.EXCEEDED_QUOTA)\n- [`AuthenticationError.GOOGLE_ACCOUNT_ALREADY_ASSOCIATED_WITH_NETWORK`](#AuthenticationError.GOOGLE_ACCOUNT_ALREADY_ASSOCIATED_WITH_NETWORK)\n- [`AuthenticationError.NETWORK_CODE_REQUIRED`](#AuthenticationError.NETWORK_CODE_REQUIRED)\n- [`AuthenticationError.NETWORK_NOT_FOUND`](#AuthenticationError.NETWORK_NOT_FOUND)\n- [`AuthenticationError.NO_NETWORKS_TO_ACCESS`](#AuthenticationError.NO_NETWORKS_TO_ACCESS)\n- [`AuthenticationError.NOT_WHITELISTED_FOR_API_ACCESS`](#AuthenticationError.NOT_WHITELISTED_FOR_API_ACCESS)\n- [`PermissionError.PERMISSION_DENIED`](#PermissionError.PERMISSION_DENIED)\n- [`ApiVersionError.UPDATE_TO_NEWER_VERSION`](#ApiVersionError.UPDATE_TO_NEWER_VERSION)\n- [404 Error](#404Error)\n- [Unmarshalling Errors](#Unmarshalling)\n\n[Entity limit errors](/ad-manager/api/reference/latest/LineItemService.EntityChildrenLimitReachedError)\n-------------------------------------------------------------------------------------------------------\n\n### `EntityChildrenLimitReachedError`\n\nSummary\n: The maximum number of allowed children has been reached for the entity\n and no more children can be added to that entity.\n\nRecommended handling tips\n: Create a new type of the entity that has reached the max allowed number\n of children and add the child entity you are trying to create to the new one.\n For example if you receive [LINE_ITEM_LIMIT_FOR_ORDER_REACHED](/ad-manager/api/reference/latest/LineItemService.EntityChildrenLimitReachedError.Reason#LINE_ITEM_LIMIT_FOR_ORDER_REACHED),\n then you will need to create a new order and add the line item you are trying\n to create to that new order.\n\n[Quota errors](/ad-manager/api/reference/latest/NetworkService.QuotaError)\n--------------------------------------------------------------------------\n\n### `QuotaError.EXCEEDED_QUOTA`\n\nSummary\n: The number of requests made per second is too high and has exceeded the\n allowable limit.\n\nRecommended handling tips\n:\n - Use batch methods such as [updateLineItems](/ad-manager/api/reference/latest/LineItemService#updateLineItems) by gathering changes locally and making a single request to fulfill those changes all at once.\n - Wait about 5 seconds and then retry the request. Note that this does not guarantee the request will succeed. If it fails again, try increasing the wait time. This is recommended for interactive applications integrating with Ad Manager that are used in real time.\n - Limit requests to 2 per second for Ad Manager networks, or 8 per second for Ad Manager 360 networks. Once again this does not guarantee that every request will succeed, but may help reduce the number of times you receive this error. This is recommended for applications integrating with Ad Manager that do not have real time interaction, such as running nightly reports.\n\n[Authentication errors](/ad-manager/api/reference/latest/NetworkService.AuthenticationError)\n--------------------------------------------------------------------------------------------\n\n### `AuthenticationError.GOOGLE_ACCOUNT_ALREADY_ASSOCIATED_WITH_NETWORK`\n\nSummary\n: The user tried to create a test network using an account that already is\n associated with a network.\n\nCommon causes\n: The user did not create a new Google account first before calling\n `NetworkService.makeTestNetwork()`.\n\nRecommended handling tips\n: Create a brand new account before calling\n `NetworkService.makeTestNetwork()`. See [how to create a test network](/ad-manager/api/start#enable_api) for more\n information.\n\n### `AuthenticationError.NETWORK_CODE_REQUIRED`\n\nSummary\n: The user did not provide a `networkCode`. To make the request,\n a network code is required.\n\nCommon causes\n: Network codes are required for all requests except\n `NetworkService.getAllNetworks()` and\n `NetworkService.makeTestNetwork()`.\n\nRecommended handling tips\n: Include the network code of the network being addressed in the request\n header. Only use a network code available to your account login. You can find\n the code on the Ad Manager website for your account, on the Admin \\\u003e Network\n Settings page next to \"Network code\". More information about setting your\n network code can be found on the [SOAP XML request and\n response headers](/ad-manager/api/soap_xml) page.\n\n### `AuthenticationError.NETWORK_NOT_FOUND`\n\nSummary\n: The request could not be made because the network code provided in the\n configuration is not found on the server.\n\nCommon causes\n: You have specified an incorrect network code in your configuration.\n\nRecommended handling tips\n: The \"trigger\" field of the error log will often suggest the correct\n network for the user.\n\n### `AuthenticationError.NO_NETWORKS_TO_ACCESS`\n\nSummary\n: The user is not associated with any network.\n\nCommon causes\n: You have not enabled your production account for API access.\n\nRecommended handling tips\n: Enable API access to your production environment. See [Enabling API Access](/ad-manager/api/start#enable_api) for information.\n\n### `AuthenticationError.NOT_WHITELISTED_FOR_API_ACCESS`\n\nSummary\n: The customer is not whitelisted for API access.\n\nCommon causes\n: Your network is not whitelisted for production, but you provided a [network code](/ad-manager/api/soap_xml) in the SOAP Header.\n:\n\nRecommended handling tips\n: Enable [API access](/ad-manager/api/start#enable_api).\n:\n\n[Permission errors](/ad-manager/api/reference/latest/NetworkService.PermissionError)\n------------------------------------------------------------------------------------\n\n### `PermissionError.PERMISSION_DENIED`\n\nSummary\n: The user does not have the required permission for the request.\n\nCommon causes\n:\n - You tried to access an object that exists in another network.\n - You tried to access an object that exists in your network, but you don't have permission to read or update.\n - You tried to perform a task that requires an additional feature to enabled on your account.\n\nRecommended handling tips\n:\n - If you are creating a UI, indicate to the user that they did not have permission to perform this action and to speak to their Administrator.\n - If you tried performing a task, such as one involving a premium-only feature that your network does not have permission to do, speak to your account manager about enabling this feature.\n - Remember, test networks are, by default, not Ad Manager 360 networks, meaning that they do not have the premium features found in Ad Manager 360 networks. Speak to your account manager to enable features on your test network.\n\n[Version errors](/ad-manager/api/reference/latest/NetworkService.ApiVersionError)\n---------------------------------------------------------------------------------\n\n### `ApiVersionError.UPDATE_TO_NEWER_VERSION`\n\nSummary\n: The application either: initiated a request that requires a newer version\n to succeed; or initiated a request to a deprecated version.\n\nCommon causes\n:\n - The version of the API call has been deprecated. Please subscribe to our [blog](//ads-developers.googleblog.com/search/label/ad_manager_api) for deprecation announcements.\n - The request you made requires a newer version of the API to succeed. This is often the case where a feature has been introduced in the UI and in order for the API to send the object correctly, it needs a newer version of the API.\n\nRecommended handling tips\n:\n - Stay up to date on API versions; plan on upgrading regularly.\n - Subscribe to our [blog](//ads-developers.googleblog.com/search/label/ad_manager_api) to be notified about deprecations.\n\n404 Error\n---------\n\nSummary\n: Your request did not reach the server.\n\nCommon causes\n: Your internet connection or proxy may be misconfigured. The version of\n the API you are calling may also be sunsetted.\n:\n\nRecommended handling tips\n: Check your internet or proxy configuration and make sure you are using a\n recent version of the API. You may want to upgrade your client library to\n the most recent version as well.\n:\n\nPrevention tips\n: Subscribe to the [Ad\n Manager API forum](//groups.google.com/group/google-doubleclick-for-publishers-api) and check our [blog](//ads-developers.googleblog.com/search/label/ad_manager_api)\n to stay updated on the latest Ad Manager API news.\n\nUnmarshalling Error\n-------------------\n\nSummary\n: The SOAP XML in your request did not conform to the WSDL\n specification.\n\nCommon causes\n: The request contains fields or entities not included in the WSDL\n specification, or in the wrong namespace.\n:\n: There is a type mismatch in the request (e.g., an integer field has a\n string value).\n:\n\nRecommended handling tips\n: Ensure that your request conforms to the WSDL specification.\n:\n: Use a [client library](/ad-manager/api/clients) to generate\n valid SOAP, and use this for comparison. All client libraries support\n logging of SOAP requests and responses.\n:"]]