有兴趣分享您对 Google Ads API 的反馈吗?
注册即可获邀参与用户调研!
OAuth 服务账号流程
<ph type="x-smartling-placeholder">
本指南将向您介绍如何使用
服务账号拥有自己的凭据。
这些步骤只需执行一次,除非您撤消或删除 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" />
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-09-12。
[null,null,["最后更新时间 (UTC):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."]]],[]]