Soenneker.SendGrid.Client 4.0.2799

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.SendGrid.Client --version 4.0.2799
                    
NuGet\Install-Package Soenneker.SendGrid.Client -Version 4.0.2799
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.SendGrid.Client" Version="4.0.2799" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.SendGrid.Client" Version="4.0.2799" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.SendGrid.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.SendGrid.Client --version 4.0.2799
                    
#r "nuget: Soenneker.SendGrid.Client, 4.0.2799"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.SendGrid.Client@4.0.2799
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.SendGrid.Client&version=4.0.2799
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.SendGrid.Client&version=4.0.2799
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.2816 7 11/11/2026
11.0.2815 43 11/11/2026
11.0.2814 37 11/11/2026
11.0.2813 39 11/11/2026
11.0.2812 45 11/11/2026
11.0.2811 45 11/11/2026
11.0.2810 42 11/11/2026
11.0.2809 78 11/3/2026
11.0.2808 94 11/3/2026
11.0.2807 87 11/3/2026
11.0.2806 87 11/3/2026
11.0.2805 90 11/3/2026
11.0.2804 114 10/27/2026
11.0.2803 113 10/27/2026
11.0.2802 110 10/26/2026
11.0.2801 150 10/26/2026
11.0.2800 100 10/26/2026
4.0.2799 126 10/26/2026
4.0.2798 104 10/25/2026
4.0.2797 147 10/15/2026
Loading failed

Update dependency Soenneker.Extensions.Configuration to 4.0.912 (#3357)