Soenneker.HubSpot.OpenApiClientUtil 4.0.305

Prefix Reserved
dotnet add package Soenneker.HubSpot.OpenApiClientUtil --version 4.0.305
                    
NuGet\Install-Package Soenneker.HubSpot.OpenApiClientUtil -Version 4.0.305
                    
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="4.0.305" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.HubSpot.OpenApiClientUtil" Version="4.0.305" />
                    
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 4.0.305
                    
#r "nuget: Soenneker.HubSpot.OpenApiClientUtil, 4.0.305"
                    
#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@4.0.305
                    
#: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=4.0.305
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.HubSpot.OpenApiClientUtil&version=4.0.305
                    
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 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
4.0.305 52 10/7/2026
4.0.304 82 10/6/2026
4.0.303 106 10/3/2026
4.0.302 92 10/2/2026
4.0.301 87 10/1/2026
4.0.300 98 9/30/2026
4.0.299 100 9/29/2026
4.0.298 91 9/29/2026
4.0.297 103 9/26/2026
4.0.296 98 9/25/2026
4.0.295 88 9/25/2026
4.0.294 88 9/25/2026
4.0.293 91 9/24/2026
4.0.292 172 9/18/2026
4.0.291 118 9/17/2026
4.0.290 109 9/17/2026
4.0.289 99 9/16/2026
4.0.288 100 9/16/2026
4.0.287 93 9/16/2026
4.0.286 106 9/16/2026
Loading failed

Update dependency Soenneker.HubSpot.OpenApiClient to 4.0.141 (#428)

Automatically merged