.NET クライアント ライブラリ
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
.NET クライアント ライブラリは GitHub でホストされ、NuGet パッケージとして配布されます。このライブラリには、認証情報の管理や Google Ads API サービス クライアントの作成を容易にするなど、API の使用に役立つ機能がいくつか用意されています。
このライブラリは、次の .NET Framework をサポートしています。
- .NET Framework 4.7.2 以降(
net472
)
- .NET Standard 2.1(
netstandard2.1
)
- .NET 6.0(
net6.0
)
- .NET 8.0(
net8.0
)
.NET Standard 2.1 は他の複数の .NET バージョンと実装と互換性があるため、ライブラリは他の多くのプラットフォームで正常に動作する可能性があります。ただし、互換性の公式テストは実施していないため、これらのプラットフォームは公式にはサポートしていません。.NET 標準の互換性について詳しくは、https://learn.microsoft.com/en-us/dotnet/standard/net-standard?tabs=net-standard-2-1 をご覧ください。
Google Ads API .NET ライブラリは、デフォルトで Grpc.Net.Client
を使用し、サポートされていないプラットフォームでは Grpc.Core
にフォールバックします。UseGrpcCore
を true
に設定すると、Grpc.Core
の使用を強制できます。以前の Grpc ライブラリを使用するをご覧ください。
このライブラリの使用を開始するには、前提条件を確認し、スタートガイドをご覧ください。
OAuth2 更新トークンについては、OAuth デスクトップ アプリケーションとウェブ アプリケーションのフローをご覧ください。OAuth2 サービス アカウントを使用して API 呼び出しを行うには、OAuth サービス アカウント フローをご覧ください。
ライブラリの機能とユーティリティについては、次のガイドをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-09-05 UTC。
[null,null,["最終更新日 2025-09-05 UTC。"],[[["\u003cp\u003eThe Google Ads API client library for .NET will no longer support .NET 5.0 starting with version 19.0.0, and users should upgrade to a supported version before the end of 2024.\u003c/p\u003e\n"],["\u003cp\u003eThe library supports .NET Framework 4.7.2+, .NET Standard 2.1, .NET 6.0, and .NET 8.0.\u003c/p\u003e\n"],["\u003cp\u003eIt is available as a NuGet package and hosted on GitHub, providing features for easier credential management and service client creation.\u003c/p\u003e\n"],["\u003cp\u003eWhile .NET Standard 2.1 offers compatibility with various .NET versions and implementations, only the explicitly listed frameworks are officially supported.\u003c/p\u003e\n"],["\u003cp\u003eUsers can find comprehensive documentation and guides, covering setup, OAuth flows, logging, and advanced features on the official Google Ads API website.\u003c/p\u003e\n"]]],[],null,["# The .NET Client Library\n\nThe .NET client library is [hosted on GitHub](https://github.com/googleads/google-ads-dotnet) and is distributed\nas a [NuGet package](//www.nuget.org/packages/Google.Ads.GoogleAds/). It\noffers several features to help you use the API, including easier management\nof credentials and creation of Google Ads API service clients.\n\nThe library supports the following .NET Frameworks:\n\n- .NET Framework 4.7.2+ (`net472`)\n- .NET Standard 2.1 (`netstandard2.1`)\n- .NET 6.0 (`net6.0`)\n- .NET 8.0 (`net8.0`)\n\n.NET Standard 2.1 is compatible with several other .NET versions and\nimplementations, so the library might work fine on many other platforms.\nHowever, we haven't officially tested the compatibility and thus don't\nofficially support these platforms.\nSee https://learn.microsoft.com/en-us/dotnet/standard/net-standard?tabs=net-standard-2-1\nto learn more about .NET standard compatibility.\n\nThe Google Ads API .NET library uses `Grpc.Net.Client` as the default, with a\nfallback to `Grpc.Core` on unsupported platforms. You can force the use of\n`Grpc.Core` by setting `UseGrpcCore` to `true`. See\n[Use the legacy Grpc library](/google-ads/api/docs/client-libs/dotnet/getting-started).\n\nTo start using this library, check the\n[prerequisites](/google-ads/api/docs/get-started/introduction) and consult the\n[getting started guide](/google-ads/api/docs/client-libs/dotnet/getting-started).\n\nFor information on OAuth2 refresh tokens, check out [OAuth desktop and web\napplication flows](/google-ads/api/docs/client-libs/dotnet/oauth-web). And to make API calls\nusing OAuth2 service accounts, see [OAuth service account\nflow](/google-ads/api/docs/client-libs/dotnet/oauth-service).\n\nConsult the following guides for the library's features and utilities:\n\n- [Logging](/google-ads/api/docs/client-libs/dotnet/logging)\n- [FieldMasks](/google-ads/api/docs/client-libs/dotnet/field-masks)\n- [ResourceNames](/google-ads/api/docs/client-libs/dotnet/resource-names)\n- [Custom gRPC interceptors](/google-ads/api/docs/client-libs/dotnet/custom-interceptors)\n- [Protocol buffer types](/google-ads/api/docs/client-libs/dotnet/working-with-protobuf)"]]