Soenneker.Zendesk.HttpClients 4.0.56

Prefix Reserved
dotnet add package Soenneker.Zendesk.HttpClients --version 4.0.56
                    
NuGet\Install-Package Soenneker.Zendesk.HttpClients -Version 4.0.56
                    
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.Zendesk.HttpClients" Version="4.0.56" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Zendesk.HttpClients" Version="4.0.56" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Zendesk.HttpClients" />
                    
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.Zendesk.HttpClients --version 4.0.56
                    
#r "nuget: Soenneker.Zendesk.HttpClients, 4.0.56"
                    
#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.Zendesk.HttpClients@4.0.56
                    
#: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.Zendesk.HttpClients&version=4.0.56
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Zendesk.HttpClients&version=4.0.56
                    
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

Soenneker.Zendesk.HttpClients

Provides a cached HttpClient configured for one Zendesk account and authentication credential.

Install

dotnet add package Soenneker.Zendesk.HttpClients

Configuration

For API-token authentication, Base64-encode the UTF-8 value {email_address}/token:{api_token} and supply the result as Credentials:

{
  "Zendesk": {
    "ClientBaseUrl": "https://acme.zendesk.com/",
    "Credentials": "base64-encoded-credentials"
  }
}

The default header is Authorization: Basic {token}. OAuth can be configured without changing code:

{
  "Zendesk": {
    "ClientBaseUrl": "https://acme.zendesk.com/",
    "Credentials": "oauth-access-token",
    "AuthHeaderValueTemplate": "Bearer {token}"
  }
}

AuthHeaderName can override the header name when required. ClientBaseUrl should be the account origin; generated API paths already include /api/v2.

Registration

using Soenneker.Zendesk.HttpClients.Registrars;

services.AddZendeskOpenApiHttpClientAsSingleton();

Scoped registration is also available:

services.AddZendeskOpenApiHttpClientAsScoped();

Usage

public sealed class ZendeskTicketReader
{
    private readonly IZendeskOpenApiHttpClient _zendesk;

    public ZendeskTicketReader(IZendeskOpenApiHttpClient zendesk)
    {
        _zendesk = zendesk;
    }

    public async Task<string> GetTickets(CancellationToken cancellationToken)
    {
        HttpClient client = await _zendesk.Get(cancellationToken);
        return await client.GetStringAsync("api/v2/tickets.json", cancellationToken);
    }
}

Each provider owns its cached named client. Disposing the provider removes that client from the shared cache; disposing the cache itself remains the responsibility of its DI lifetime.

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 (1)

Showing the top 1 NuGet packages that depend on Soenneker.Zendesk.HttpClients:

Package Downloads
Soenneker.Zendesk.OpenApiClientUtil

Provides a cached Zendesk OpenAPI client over the configured shared HTTP transport.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.56 119 9/17/2026
4.0.55 85 9/16/2026
4.0.54 112 9/16/2026
4.0.53 90 9/16/2026
4.0.52 95 9/16/2026
4.0.51 91 9/15/2026
4.0.50 147 9/13/2026
4.0.49 98 9/13/2026
4.0.48 109 9/13/2026
4.0.47 97 9/13/2026
4.0.46 105 9/12/2026
4.0.43 136 9/9/2026
4.0.42 103 9/9/2026
4.0.41 110 9/8/2026
4.0.40 127 9/8/2026
4.0.39 120 9/8/2026
4.0.38 108 9/7/2026
4.0.37 117 9/7/2026
4.0.36 111 9/7/2026
4.0.35 113 9/5/2026
Loading failed