有兴趣分享您对 Google Ads API 的反馈吗?
注册即可获邀参与用户调研!
下载工具和客户端库
下载以下工具,以完成本教程的其余步骤。
Google Cloud CLI
Google Ads API 使用 OAuth 2.0 作为授权机制。本教程将使用 Google Cloud CLI 执行各种 OAuth 2.0 授权步骤。按照说明安装 gcloud CLI。
本指南其余部分中的说明已经验证可与以下版本的 gcloud 工具搭配使用,但由于应用行为或命令行选项存在差异,可能不适用于之前的版本。
:~$ gcloud version
Google Cloud SDK 492.0.0
alpha 2024.09.06
beta 2024.09.06
bq 2.1.8
bundled-python3-unix 3.11.9
core 2024.09.06
enterprise-certificate-proxy 0.3.2
gcloud-crc32c 1.0.0
gsutil 5.30
客户端库或 HTTP 客户端
您可以选择下载客户端库或 HTTP 客户端,具体取决于您希望如何进行 API 调用。
使用 HTTP 客户端 (REST)
下载并安装 curl,这是一个用于通过网址传输数据的命令行工具。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-02-12。
[null,null,["最后更新时间 (UTC):2025-02-12。"],[[["This guide requires downloading and installing `oauth2l` or `gcloud CLI` for authorization using OAuth 2.0 to obtain access and refresh tokens."],["Ensure your `oauth2l` version is v1.3.0 and `gcloud CLI` version is 492.0.0 for compatibility with the instructions."],["You will need to utilize either a Google Ads API client library or an HTTP client like `curl` to interact with the API."]]],[]]