在 Google Ads API 中为 OAuth 配置客户端库
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
在满足配置要求后,您就可以随时设置客户端库来处理 Google Ads API 调用了。由于每个客户端库的配置方式各不相同,请根据您的具体编程语言按照下面链接的说明进行操作。
验证配置
完成 OAuth 设置后,使用客户端库中提供的代码示例之一调用 Google Ads API。选择一个简单的示例(例如 GetCampaigns
)来验证您的设置。
如果您遇到问题,请参阅问题排查指南,了解有关调试常见问题的提示。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-27。
[null,null,["最后更新时间 (UTC):2025-08-27。"],[[["\u003cp\u003eThis page provides instructions for setting up a client library to interact with the Google Ads API after completing configuration requirements.\u003c/p\u003e\n"],["\u003cp\u003eClient library setup varies depending on the programming language, with links provided for Java, .NET, PHP, Python, Ruby, and Perl.\u003c/p\u003e\n"],["\u003cp\u003eUsers should verify their setup by making a simple API call, such as GetCampaigns, and refer to the troubleshooting guide if any issues arise.\u003c/p\u003e\n"]]],[],null,["# Configure a Client Library for OAuth in the Google Ads API\n\nAfter you've obtained the [configuration\nrequirements](/google-ads/api/docs/get-started/introduction), you're ready to set up a\nclient library to handle Google Ads API calls. Since each client library is configured\ndifferently, follow the linked instructions for your particular programming\nlanguage. \n\n### Java\n\n- [Desktop and Web app flows](/google-ads/api/docs/client-libs/java/oauth-web)\n\n### .NET\n\n- [Desktop and Web app flows](/google-ads/api/docs/client-libs/dotnet/oauth-web)\n\n### PHP\n\n- [Desktop and Web app flows](/google-ads/api/docs/client-libs/php/oauth-web)\n\n### Python\n\n- [Desktop and Web app flows](/google-ads/api/docs/client-libs/python/oauth-web)\n\n### Ruby\n\n- [Desktop and Web app flows](/google-ads/api/docs/client-libs/ruby/oauth-web)\n\n### Perl\n\n- [Desktop and Web app flows](/google-ads/api/docs/client-libs/perl/oauth-web)\n\nVerify your configuration\n-------------------------\n\nWhen you've completed setting up OAuth, make a call to the Google Ads API using one of\nthe provided code examples in the client library. Choose a simple example, like\n[`GetCampaigns`](/google-ads/api/docs/get-started/make-first-call), to verify your setup.\n\nIf you encounter issues, consult the [troubleshooting\nguide](/google-ads/api/docs/best-practices/troubleshooting) for tips on debugging common\nissues."]]