在 Google Ads API 中設定 OAuth 的用戶端程式庫
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
取得設定需求後,即可設定用戶端程式庫來處理 Google Ads API 呼叫。由於每個用戶端程式庫的設定方式不同,請按照特定程式設計語言的連結說明操作。
驗證您的設定
完成 OAuth 設定後,請使用用戶端程式庫中提供的程式碼範例,呼叫 Google Ads API。選擇簡單的範例 (例如 GetCampaigns
),驗證設定是否正確。
如果遇到問題,請參閱疑難排解指南,取得常見問題的偵錯提示。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-27 (世界標準時間)。
[null,null,["上次更新時間: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."]]