如果您使用的是现有的 Google API 控制台项目,并且该项目已生成客户端 ID 和客户端密钥,则可以跳过此步骤。否则,请按照说明创建客户端 ID 和客户端密钥。
您可以选择桌面应用或 Web 应用作为应用类型。创建 OAuth 2.0 客户端后,请先点击其 Download OAuth client(下载 OAuth 客户端)图标,然后在随即显示的界面上点击 DOWNLOAD JSON(下载 JSON)按钮,下载该客户端的 JSON 文件。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[],[],null,["# Configure the Google API Console project\n\n**Note:** The current step of this tutorial depends on the [type of application](/google-ads/api/docs/get-started/choose-application-type) you are building. We strongly recommend using a service account to make API calls. However, the user authentication option is also provided as an alternative. The rest of this tutorial will be customized based on your choice. \nService accounts User authentication\n\nCreate a service account and key\n--------------------------------\n\n| **Note:** If you are already using another Google API and have created an OAuth 2.0 service account and key, you can skip this step and reuse the existing credentials.\n\nStart by [creating a service account and credentials](/google-ads/api/docs/get-started/choose-application-type).\nNext, [create credentials for the service account](/workspace/guides/create-credentials#service-account).\nDownload the service account key in JSON format and note the service account ID\nand email."]]