想分享對 Google Ads API 的意見嗎?
立即註冊,等待受邀參與使用者研究調查!
OAuth 服務帳戶流程
本指南會逐步說明如何使用您的
透過服務帳戶擁有自己的憑證
這些步驟只需執行一次,除非您撤銷或刪除 OAuth2
憑證
建立 OAuth2 憑證
產生服務帳戶 ID 和 *.JSON
檔案,依據
按照連結中的指示操作,然後回到這個頁面。
使用 JSON 檔案設定用戶端程式庫
請在 App.config / Web.config
中設定下列鍵。詳情請參閱
設定指南
詳細資料。
<add key="OAuth2Mode" value="SERVICE_ACCOUNT" />
<add key="OAuth2SecretsJsonPath" value="INSERT_OAUTH2_SECRETS_JSON_FILE_PATH_HERE" />
<!-- Supply the email address of the user to impersonate. -->
<add key="OAuth2PrnEmail" value="INSERT_OAUTH2_USER_EMAIL_HERE" />
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-09-12 (世界標準時間)。
[null,null,["上次更新時間:2024-09-12 (世界標準時間)。"],[[["The Google Ads API client library for .NET will no longer support .NET 5.0 starting with version 19.0.0, and upgrading before the end of 2024 is recommended."],["This guide explains how to set up OAuth2 for API access using service accounts, requiring a Google Workspace domain and domain-wide delegation access granted to the service account."],["Users need to generate a service account ID and JSON file before proceeding with client library configuration."],["Configuration involves setting keys in `App.config` or `Web.config`, including OAuth2Mode, OAuth2SecretsJsonPath, and OAuth2PrnEmail."]]],[]]