API Báo cáo Search Ads 360 mới hiện đã ra mắt. Tham gia nhóm Google searchads-api-announcements để luôn được cập nhật về những cải tiến và bản phát hành sắp tới.
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
Cấu hình thư viện ứng dụng Java
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.
Thư viện tìm tệp cấu hình trong System.getProperty("user.home") + "/searchads360.properties".
Định dạng của tệp cấu hình là định dạng của tệp Thuộc tính Java của các cặp khoá-giá trị. Các khoá được hỗ trợ sẽ khác nhau tuỳ thuộc vào quy trình xác thực được chọn.
Các khoá được hỗ trợ cho luồng ứng dụng web và máy tính
Nếu bạn đang sử dụng quy trình ứng dụng máy tính hoặc web, thì các khoá được hỗ trợ sẽ như sau:
# Credential for accessing Google's OAuth servers.# Provided by console.cloud.google.com.
api.searchads360.clientId=INSERT_CLIENT_ID_HERE
# Credential for accessing Google's OAuth servers.# Provided by console.cloud.google.com.
api.searchads360.clientSecret=INSERT_CLIENT_SECRET_HERE
# Renewable OAuth credential associated with 1 or more Search Ads accounts.
api.searchads360.refreshToken=INSERT_REFRESH_TOKEN_HERE
# Required for manager accounts only: Specify the login customer ID used to# authenticate API calls. This will be the customer ID of the authenticated# manager account. You can also specify this later in code if your application# uses multiple manager account + OAuth pairs.## api.searchads360.loginCustomerId=INSERT_LOGIN_CUSTOMER_ID_HERE
Kết hợp các phương pháp định cấu hình
SearchAds360Client và trình tạo của lớp này hỗ trợ việc kết hợp nhiều chiến lược cấu hình. Ví dụ: bạn có thể sử dụng tệp thuộc tính để định cấu hình thông tin xác thực của thực thể và các thuộc tính khác bằng đoạn mã sau.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2026-05-13 UTC."],[],["The library utilizes a configuration file located at `user.home/searchads360.properties`, formatted as key-value pairs. For desktop/web flows, required keys include `api.searchads360.clientId`, `api.searchads360.clientSecret`, and `api.searchads360.refreshToken`. Manager accounts also need `api.searchads360.loginCustomerId`. An OAuth refresh token can be generated via a provided script or the OAuth Playground. Configurations can be combined using the `SearchAds360Client` builder, which allows file-based configuration and runtime modifications.\n"]]