Soenneker.HubSpot.OpenApiClientUtil 11.0.336

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.HubSpot.OpenApiClientUtil --version 11.0.336
                    
NuGet\Install-Package Soenneker.HubSpot.OpenApiClientUtil -Version 11.0.336
                    
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.HubSpot.OpenApiClientUtil" Version="11.0.336" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.HubSpot.OpenApiClientUtil" Version="11.0.336" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.HubSpot.OpenApiClientUtil" />
                    
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.HubSpot.OpenApiClientUtil --version 11.0.336
                    
#r "nuget: Soenneker.HubSpot.OpenApiClientUtil, 11.0.336"
                    
#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.HubSpot.OpenApiClientUtil@11.0.336
                    
#: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.HubSpot.OpenApiClientUtil&version=11.0.336
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.HubSpot.OpenApiClientUtil&version=11.0.336
                    
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.HubSpot.OpenApiClientUtil

Create and reuse authenticated HubSpot generated clients for one or more private apps.

Install

dotnet add package Soenneker.HubSpot.OpenApiClientUtil

Configuration

{
  "HubSpot": {
    "Token": "<private app access token>"
  }
}

The parameterless Get() requires HubSpot:Token. You can omit it when every call supplies a token explicitly.

Register

using Soenneker.HubSpot.OpenApiClientUtil.Registrars;

services.AddHubSpotOpenApiClientUtilAsScoped();

The scoped utility deliberately keeps IHubSpotClientUtil singleton. Disposing a scope releases that utility's generated-client cache without tearing down the long-lived HTTP clients used by later scopes. Use AddHubSpotOpenApiClientUtilAsSingleton() when the generated-client cache should also live for the application lifetime.

Usage

using Soenneker.HubSpot.OpenApiClient;
using Soenneker.HubSpot.OpenApiClient.Models;
using Soenneker.HubSpot.OpenApiClientUtil.Abstract;

HubSpotOpenApiClient client = await clientUtil.Get(cancellationToken);

CollectionResponsePublicOwnerForwardPaging? owners =
    await client.Crm.Owners.TwoZeroTwoSixZeroThree.GetAsync(
        cancellationToken: cancellationToken);

To work with multiple HubSpot accounts, pass each token explicitly:

HubSpotOpenApiClient tenantClient = await clientUtil.Get(
    tenantAccessToken,
    cancellationToken);

Calls using the same token on the same utility instance reuse the generated client. Different tokens receive separate generated clients and separate authenticated HTTP clients.

Authentication is applied by the underlying HTTP provider; the Kiota adapter does not add a second bearer header. Let the service container dispose the utility and provider rather than disposing cached clients directly.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
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.338 73 10/27/2026
11.0.337 66 10/27/2026
11.0.336 80 10/27/2026
11.0.335 81 10/27/2026
11.0.334 74 10/27/2026
11.0.333 90 10/26/2026
11.0.332 81 10/26/2026
11.0.331 86 10/26/2026
4.0.330 121 10/23/2026
4.0.329 93 10/22/2026
4.0.328 119 10/20/2026
4.0.327 121 10/17/2026
4.0.326 109 10/15/2026
4.0.325 95 10/15/2026
4.0.324 94 10/14/2026
4.0.323 90 10/14/2026
4.0.321 88 10/14/2026
4.0.320 88 10/14/2026
4.0.314 102 10/13/2026
4.0.311 88 10/12/2026
Loading failed

Updated Soenneker.HubSpot.Client to 11.0.214