Lỗi phổ biến
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Trang này mô tả các lỗi thường gặp nhất mà API Google Ad Manager trả về. Lỗi được trả về ở định dạng Error.REASON
:
EntityChildrenLimitReachedError
- Tóm tắt
- Đối tượng có thể đã đạt đến số lượng phần tử con tối đa được phép nên bạn không thể thêm phần tử con nào vào thực thể đó nữa.
- Mẹo xử lý nên dùng
- Tạo một loại thực thể con mới đã đạt đến số lượng phần tử con tối đa được phép và thêm thực thể con mà bạn đang cố gắng tạo vào một thực thể mới.
Ví dụ: nếu bạn nhận được LINE_ITEM_LIMIT_FOR_ORDER_REACHED,
thì bạn sẽ cần tạo một đơn đặt hàng mới và thêm mục hàng bạn đang cố gắng tạo vào đơn đặt hàng mới đó.
QuotaError.EXCEEDED_QUOTA
- Tóm tắt
- Số lượng yêu cầu được thực hiện mỗi giây quá cao và vượt quá
giới hạn cho phép.
- Mẹo xử lý nên dùng
-
- Sử dụng các phương thức hàng loạt như updateLineItems bằng cách thu thập các thay đổi cục bộ và thực hiện một yêu cầu duy nhất để thực hiện tất cả các thay đổi đó cùng một lúc.
- Đợi khoảng 5 giây rồi thử yêu cầu lại. Xin lưu ý rằng điều này không đảm bảo rằng yêu cầu sẽ thành công. Nếu tính năng này vẫn không thành công, hãy thử tăng thời gian chờ. Bạn nên sử dụng tính năng này cho các ứng dụng tương tác tích hợp với Ad Manager được dùng theo thời gian thực.
- Giới hạn yêu cầu ở mức 2/giây đối với mạng Ad Manager hoặc 8 yêu cầu/giây đối với mạng Ad Manager 360. Một lần nữa, điều này không đảm bảo rằng
mọi yêu cầu sẽ thành công, nhưng có thể giúp giảm số lần bạn gặp
lỗi này. Bạn nên áp dụng tính năng này cho các ứng dụng tích hợp với Ad Manager
không có tương tác theo thời gian thực, chẳng hạn như chạy báo cáo hằng đêm.
AuthenticationError.GOOGLE_ACCOUNT_ALREADY_ASSOCIATED_WITH_NETWORK
- Tóm tắt
- Người dùng cố gắng tạo một mạng thử nghiệm bằng cách sử dụng một tài khoản đã liên kết với một mạng.
- Nguyên nhân thường gặp
- Trước khi gọi
NetworkService.makeTestNetwork()
, người dùng không tạo Tài khoản Google mới.
- Mẹo xử lý nên dùng
- Hãy tạo một tài khoản hoàn toàn mới trước khi gọi
NetworkService.makeTestNetwork()
. Hãy xem cách tạo mạng kiểm thử để biết thêm thông tin.
AuthenticationError.NETWORK_CODE_REQUIRED
- Tóm tắt
- Người dùng chưa cung cấp
networkCode
. Để gửi yêu cầu, bạn phải có mã mạng.
- Nguyên nhân thường gặp
- Mã mạng là bắt buộc đối với tất cả các yêu cầu, ngoại trừ
NetworkService.getAllNetworks()
và NetworkService.makeTestNetwork()
.
- Mẹo xử lý nên dùng
- Đưa mã mạng của mạng đang được xử lý vào tiêu đề của yêu cầu. Chỉ sử dụng mã mạng có sẵn để đăng nhập tài khoản của bạn. Bạn có thể tìm thấy
mã này trên trang web Ad Manager cho tài khoản của mình, trên trang Quản trị > Cài đặt mạng
bên cạnh "Mã mạng". Bạn có thể tìm thêm thông tin về cách đặt mã mạng trên trang tiêu đề phản hồi và yêu cầu SOAP XML.
AuthenticationError.NETWORK_NOT_FOUND
- Tóm tắt
- Không thể thực hiện yêu cầu vì không tìm thấy mã mạng được cung cấp trong cấu hình trên máy chủ.
- Nguyên nhân thường gặp
- Bạn đã chỉ định mã mạng không chính xác trong cấu hình của mình.
- Mẹo xử lý nên dùng
- Trường "kích hoạt" của nhật ký lỗi thường sẽ đề xuất đúng mạng cho người dùng.
AuthenticationError.NO_NETWORKS_TO_ACCESS
- Tóm tắt
- Người dùng không liên kết với bất kỳ mạng nào.
- Nguyên nhân thường gặp
- Bạn chưa cho phép tài khoản phát hành công khai có quyền truy cập API.
- Mẹo xử lý nên dùng
- Bật quyền truy cập API vào môi trường phát hành chính thức. Xem Bật quyền truy cập API để biết thông tin.
AuthenticationError.NOT_WHITELISTED_FOR_API_ACCESS
- Tóm tắt
- Khách hàng không có tên trong danh sách cho phép để truy cập API.
- Nguyên nhân thường gặp
- Mạng của bạn chưa có trong danh sách cho phép để phát hành công khai, nhưng bạn đã cung cấp mã mạng trong Tiêu đề SOAP.
-
- Mẹo xử lý nên dùng
- Bật quyền truy cập API.
-
PermissionError.PERMISSION_DENIED
- Tóm tắt
- Người dùng không có quyền cần thiết đối với yêu cầu này.
- Nguyên nhân thường gặp
-
- Bạn đã cố truy cập vào một đối tượng tồn tại trong một mạng khác.
- Bạn đã cố truy cập vào một đối tượng tồn tại trong mạng của mình nhưng không có quyền đọc hoặc cập nhật.
- Bạn đã cố thực hiện một tác vụ yêu cầu bật thêm tính năng trên tài khoản của mình.
- Mẹo xử lý nên dùng
-
- Nếu bạn đang tạo giao diện người dùng, hãy cho người dùng biết rằng họ không có quyền thực hiện hành động này và hãy trao đổi với Quản trị viên của họ.
- Nếu bạn đã thử thực hiện một tác vụ, chẳng hạn như tác vụ liên quan đến tính năng chỉ dành cho cấp cao cấp nhưng mạng của bạn không có quyền thực hiện, hãy liên hệ với người quản lý tài khoản của bạn về việc bật tính năng này.
- Hãy nhớ rằng theo mặc định, mạng thử nghiệm không phải là mạng Ad Manager 360,
có nghĩa là mạng đó không có các tính năng nâng cao trong mạng Ad Manager
360. Hãy trao đổi với người quản lý tài khoản của bạn để bật các tính năng trên
mạng thử nghiệm.
ApiVersionError.UPDATE_TO_NEWER_VERSION
- Tóm tắt
- Ứng dụng: bắt đầu một yêu cầu cần có một phiên bản mới hơn để thành công; hoặc tạo một yêu cầu cho một phiên bản không dùng nữa.
- Nguyên nhân thường gặp
-
- Phiên bản của lệnh gọi API không được dùng nữa. Vui lòng đăng ký blog của chúng tôi để biết thông báo về việc ngừng sử dụng.
- Yêu cầu mà bạn đưa ra cần phải có phiên bản API mới hơn để thành công.
Đây thường là trường hợp mà một tính năng được giới thiệu trong giao diện người dùng và để API gửi đối tượng chính xác, API này cần có phiên bản API mới hơn.
- Mẹo xử lý nên dùng
-
- Luôn cập nhật các phiên bản API; lên kế hoạch nâng cấp thường xuyên.
- Hãy đăng ký blog của chúng tôi để nhận thông báo về việc ngừng sử dụng.
Lỗi 404
- Tóm tắt
- Yêu cầu của bạn không tới được máy chủ.
- Nguyên nhân thường gặp
- Kết nối Internet hoặc proxy của bạn có thể bị định cấu hình sai. Phiên bản API mà bạn đang gọi cũng có thể đã ngừng hoạt động.
-
- Mẹo xử lý nên dùng
- Kiểm tra cấu hình Internet hoặc proxy và đảm bảo bạn đang sử dụng phiên bản API mới nhất. Bạn cũng nên nâng cấp thư viện ứng dụng lên phiên bản mới nhất.
-
- Mẹo phòng tránh dịch
- Đăng ký diễn đàn API Ad Manager và xem blog của chúng tôi để nắm bắt những tin tức mới nhất về API Ad Manager.
Lỗi không sắp xếp
- Tóm tắt
- Tệp XML SOAP trong yêu cầu của bạn không tuân thủ thông số kỹ thuật WSDL.
- Nguyên nhân thường gặp
- Yêu cầu chứa các trường hoặc thực thể không có trong thông số kỹ thuật WSDL hoặc nằm trong không gian tên không chính xác.
-
- Có kiểu dữ liệu không khớp trong yêu cầu (ví dụ: trường số nguyên có giá trị chuỗi).
-
- Mẹo xử lý nên dùng
- Hãy đảm bảo rằng yêu cầu của bạn tuân thủ quy cách WSDL.
-
- Sử dụng thư viện ứng dụng để tạo SOAP hợp lệ và dùng thư viện này để so sánh. Tất cả thư viện ứng dụng đều hỗ trợ tính năng ghi nhật ký các yêu cầu và phản hồi SOAP.
-
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-08-21 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-21 UTC."],[[["\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:"]]