有兴趣分享您对 Google Ads API 的反馈吗?
注册即可获邀参与用户调研!
OAuth 服务账号流程
本指南将向您介绍如何使用
服务账号拥有自己的凭据。
这些步骤只需执行一次,除非您撤消或删除 OAuth2
凭据。
创建 OAuth2 凭据
生成服务账号 ID 和 *.JSON 文件
然后按照链接的说明操作,然后返回此页面。
使用 JSON 文件设置客户端库
在 google_ads_config.rb
中配置以下键。
c.keyfile = 'path/to/keyfile.json'
c.impersonate = 'INSERT_EMAIL_ADDRESS_TO_IMPERSONATE_HERE'
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-20。
[null,null,["最后更新时间 (UTC):2024-08-20。"],[[["This guide explains how to set up OAuth2 for API access using service accounts, a one-time process unless credentials are changed."],["The setup requires a Google Workspace domain and a service account with domain-wide delegation access granted by a super administrator."],["You need to generate a service account ID and JSON file before configuring the client library."],["The client library setup involves specifying the path to your JSON keyfile and the email address to impersonate within your `google_ads_config.rb` file."]]],[]]