Soenneker.SendGrid.Client
4.0.2718
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.SendGrid.Client --version 4.0.2718
NuGet\Install-Package Soenneker.SendGrid.Client -Version 4.0.2718
<PackageReference Include="Soenneker.SendGrid.Client" Version="4.0.2718" />
<PackageVersion Include="Soenneker.SendGrid.Client" Version="4.0.2718" />
<PackageReference Include="Soenneker.SendGrid.Client" />
paket add Soenneker.SendGrid.Client --version 4.0.2718
#r "nuget: Soenneker.SendGrid.Client, 4.0.2718"
#:package Soenneker.SendGrid.Client@4.0.2718
#addin nuget:?package=Soenneker.SendGrid.Client&version=4.0.2718
#tool nuget:?package=Soenneker.SendGrid.Client&version=4.0.2718
Soenneker.SendGrid.Client
Provides a lazily initialized instance of the official SendGridClient for mail, contacts, lists, templates, suppressions, statistics, and account APIs.
Installation
dotnet add package Soenneker.SendGrid.Client
Configuration
{
"SendGrid": {
"ApiKey": "SG.xxxxxxxxx"
}
}
Usage
using SendGrid;
using Soenneker.SendGrid.Client.Abstract;
using Soenneker.SendGrid.Client.Registrars;
services.AddSendGridClientUtilAsSingleton();
public sealed class SendGridScopeReader
{
private readonly ISendGridClientUtil _sendGrid;
public SendGridScopeReader(ISendGridClientUtil sendGrid)
{
_sendGrid = sendGrid;
}
public async Task<Response> GetScopes(CancellationToken cancellationToken)
{
SendGridClient client = await _sendGrid.Get(cancellationToken);
return await client.RequestAsync(
method: BaseClient.Method.GET,
urlPath: "scopes",
cancellationToken: cancellationToken);
}
}
The configured key determines which SendGrid endpoints the returned client can access. Use AddSendGridClientUtilAsScoped() when each scope should lazily create its own official client instance.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- SendGrid (>= 9.29.3)
- Soenneker.Extensions.Configuration (>= 4.0.871)
- Soenneker.Utils.HttpClientCache (>= 4.0.2050)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.SendGrid.Client:
| Package | Downloads |
|---|---|
|
Soenneker.SendGrid.Contacts
Adds, retrieves, searches, and deletes SendGrid Marketing contacts. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.2720 | 38 | 9/1/2026 |
| 4.0.2719 | 43 | 9/1/2026 |
| 4.0.2718 | 54 | 8/31/2026 |
| 4.0.2717 | 49 | 8/31/2026 |
| 4.0.2716 | 59 | 8/31/2026 |
| 4.0.2715 | 84 | 8/31/2026 |
| 4.0.2714 | 58 | 8/31/2026 |
| 4.0.2713 | 48 | 8/31/2026 |
| 4.0.2712 | 46 | 8/31/2026 |
| 4.0.2711 | 64 | 8/31/2026 |
| 4.0.2710 | 58 | 8/30/2026 |
| 4.0.2709 | 84 | 8/30/2026 |
| 4.0.2708 | 62 | 8/30/2026 |
| 4.0.2707 | 61 | 8/30/2026 |
| 4.0.2706 | 51 | 8/30/2026 |
| 4.0.2705 | 62 | 8/30/2026 |
| 4.0.2704 | 53 | 8/29/2026 |
| 4.0.2703 | 95 | 8/29/2026 |
| 4.0.2702 | 83 | 8/26/2026 |
| 4.0.2701 | 72 | 8/26/2026 |
Update dependency Soenneker.Utils.HttpClientCache to 4.0.2050 (#3240)