想分享對 Google Ads API 的意見嗎?
立即註冊,等待受邀參與使用者研究調查!
OAuth 服務帳戶流程
本指南會逐步說明如何使用您的
透過服務帳戶擁有自己的憑證
這些步驟只需執行一次,除非您撤銷或刪除 OAuth2
憑證
建立 OAuth2 憑證
產生服務帳戶 ID 和 *.JSON
檔案,依據
按照連結中的指示操作,然後回到這個頁面。
設定用戶端程式庫
在以下項目中設定私密金鑰 JSON 檔案路徑和委派帳戶 ID:
此外還會從 0 自動調整資源配置
您完全不必調整資源調度設定如果您使用的是 ads.properties
檔案,請新增下列程式碼:
api.googleads.serviceAccountSecretsPath=PRIVATE_KEY_FILE_PATH
api.googleads.serviceAccountUser=DELEGATE_ACCOUNT
請參閱設定指南,瞭解
來瞭解詳情。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-09-12 (世界標準時間)。
[null,null,["上次更新時間:2024-09-12 (世界標準時間)。"],[[["This guide explains how to set up OAuth2 for API access using service accounts with your own credentials."],["The setup process involves generating a service account ID and a JSON file, and then configuring your client library with the necessary credentials."],["This setup needs to be done only once and requires a Google Workspace domain with domain-wide delegation access granted to the service account."]]],[]]