有兴趣分享您对 Google Ads API 的反馈吗?
注册即可获邀参与用户调研!
OAuth 服务账号流程
本指南将向您介绍如何使用
服务账号拥有自己的凭据。
这些步骤只需执行一次,除非您撤消或删除 OAuth2
凭据。
创建 OAuth2 凭据
生成服务账号 ID 和 *.JSON
作者:
按照链接的说明操作,然后再返回此页面。
设置客户端库
在您的
配置。如果您使用的是 ads.properties
文件,请添加以下内容:
api.googleads.serviceAccountSecretsPath=PRIVATE_KEY_FILE_PATH
api.googleads.serviceAccountUser=DELEGATE_ACCOUNT
如需了解以下内容,请参阅配置指南:
其他详细信息
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-09-12。
[null,null,["最后更新时间 (UTC):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."]]],[]]