常见错误
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本页介绍了 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 网站上为您的帐号找到该代码,具体位置在“管理”>“广告资源网设置”页面上的“广告资源网代码”旁边。如需详细了解如何设置网络代码,请参阅 SOAP XML 请求和响应标头页面。
AuthenticationError.NETWORK_NOT_FOUND
- 摘要
- 由于未在服务器上找到配置中提供的网络代码,因此无法发出请求。
- 常见原因
- 您在自己的配置中指定的广告资源网代码不正确。
- 处理建议
- 错误日志的“trigger”字段通常会为用户建议正确的网络。
AuthenticationError.NO_NETWORKS_TO_ACCESS
- 摘要
- 用户未与任何广告网络关联。
- 常见原因
- 您尚未为生产帐号启用 API 访问权限。
- 处理建议
- 启用对生产环境的 API 访问权限。如需了解相关信息,请参阅启用 API 访问权限。
AuthenticationError.NOT_WHITELISTED_FOR_API_ACCESS
- 摘要
- 客户不在 API 访问权限的白名单中。
- 常见原因
- 您的广告资源网不在生产环境的白名单中,但您在 SOAP 标头中提供了广告资源网代码。
-
- 处理建议
- 启用 API 访问权限。
-
PermissionError.PERMISSION_DENIED
- 摘要
- 用户不具备执行请求所需的权限。
- 常见原因
-
- 您尝试访问其他广告资源网中的对象。
- 您尝试访问广告联盟中存在的对象,但您无权读取或更新。
- 您尝试执行的任务需要为您的账号启用其他功能。
- 处理建议
-
- 如果您要创建界面,请向用户表明他们无权执行此操作,然后咨询管理员。
- 如果您尝试执行某项任务,例如涉及您的广告资源网没有相应权限的高级功能,请向您的客户经理咨询如何启用此功能。
- 请注意,默认情况下,测试广告联盟不是 Ad Manager 360 广告联盟,这意味着它们不含 Ad Manager 360 广告联盟中的高级功能。如需启用测试广告资源网的功能,请与您的客户经理联系。
ApiVersionError.UPDATE_TO_NEWER_VERSION
- 摘要
- 应用:发起了需要更高版本才能成功的请求;或者发起了对已弃用版本的请求。
- 常见原因
-
- 此 API 调用版本已弃用。请订阅我们的博客,以便接收相关的弃用公告。
- 您发出的请求需要较新版本的 API 才能成功。这种情况通常发生在界面中,并且为了使 API 正确发送对象,需要更高版本的 API。
- 处理建议
-
- 及时掌握 API 版本的最新动态;做好定期升级计划。
- 请订阅我们的博客,以便接收相关的停用通知。
404 错误
- 摘要
- 您的请求未到达服务器。
- 常见原因
- 您的互联网连接或代理可能配置有误。此外,您要调用的 API 版本可能已停用。
-
- 处理建议
- 检查您的互联网或代理配置,并确保您使用的是最新版本的 API。您可能还需要将客户端库升级到最新版本。
-
- 预防建议
- 请订阅 Ad Manager API 论坛并查看我们的博客,及时了解最新的 Ad Manager API 资讯。
取消编组错误
- 摘要
- 请求中的 SOAP XML 不符合 WSDL 规范。
- 常见原因
- 请求包含未包含在 WSDL 规范中或位于错误的命名空间中的字段或实体。
-
- 请求中存在类型不匹配的情况(例如,整数字段包含字符串值)。
-
- 处理建议
- 确保您的请求符合 WSDL 规范。
-
- 使用客户端库生成有效的 SOAP,然后使用该 SOAP 进行比较。所有客户端库都支持记录 SOAP 请求和响应。
-
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-21。
[null,null,["最后更新时间 (UTC):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:"]]