下载工具和客户端库
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
下载以下工具,以完成本教程的剩余步骤。
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-08-27。
[null,null,["最后更新时间 (UTC):2025-08-27。"],[[["\u003cp\u003eThis guide requires downloading and installing \u003ccode\u003eoauth2l\u003c/code\u003e or \u003ccode\u003egcloud CLI\u003c/code\u003e for authorization using OAuth 2.0 to obtain access and refresh tokens.\u003c/p\u003e\n"],["\u003cp\u003eEnsure your \u003ccode\u003eoauth2l\u003c/code\u003e version is v1.3.0 and \u003ccode\u003egcloud CLI\u003c/code\u003e version is 492.0.0 for compatibility with the instructions.\u003c/p\u003e\n"],["\u003cp\u003eYou will need to utilize either a Google Ads API client library or an HTTP client like \u003ccode\u003ecurl\u003c/code\u003e to interact with the API.\u003c/p\u003e\n"]]],[],null,["# Download tools and client libraries\n\nDownload the following tools to complete the remaining steps of this\ntutorial.\n\nThe Google Cloud CLI\n--------------------\n\nThe Google Ads API uses OAuth 2.0 as the authorization mechanism. This tutorial\nuses the Google Cloud CLI as a way to perform various OAuth 2.0 authorization\nsteps. Follow the [instructions](https://cloud.google.com/sdk/docs/install)\nto install gcloud CLI.\n\nThe instructions for the rest of this guide were verified to work with the\nfollowing version of the gcloud tool and might not work with previous versions\ndue to differences in application behavior or command-line options. \n\n :~$ gcloud version\n Google Cloud SDK 492.0.0\n alpha 2024.09.06\n beta 2024.09.06\n bq 2.1.8\n bundled-python3-unix 3.11.9\n core 2024.09.06\n enterprise-certificate-proxy 0.3.2\n gcloud-crc32c 1.0.0\n gsutil 5.30\n\nClient library or HTTP client\n-----------------------------\n\nYou can choose to either download a client library or an HTTP client depending\non how you'd like to make API calls. \n\n### Use a client library\n\nDownload and install a [client library](/google-ads/api/docs/client-libs) of your choice.\n\n### Use HTTP client (REST)\n\nDownload and install [curl](https://curl.se/download.html),\nthe command line tool for transferring data through a URL."]]