Soenneker.HubSpot.OpenApiClientUtil
4.0.245
Prefix Reserved
dotnet add package Soenneker.HubSpot.OpenApiClientUtil --version 4.0.245
NuGet\Install-Package Soenneker.HubSpot.OpenApiClientUtil -Version 4.0.245
<PackageReference Include="Soenneker.HubSpot.OpenApiClientUtil" Version="4.0.245" />
<PackageVersion Include="Soenneker.HubSpot.OpenApiClientUtil" Version="4.0.245" />
<PackageReference Include="Soenneker.HubSpot.OpenApiClientUtil" />
paket add Soenneker.HubSpot.OpenApiClientUtil --version 4.0.245
#r "nuget: Soenneker.HubSpot.OpenApiClientUtil, 4.0.245"
#:package Soenneker.HubSpot.OpenApiClientUtil@4.0.245
#addin nuget:?package=Soenneker.HubSpot.OpenApiClientUtil&version=4.0.245
#tool nuget:?package=Soenneker.HubSpot.OpenApiClientUtil&version=4.0.245
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 | 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
- Soenneker.HubSpot.Client (>= 4.0.136)
- Soenneker.HubSpot.OpenApiClient (>= 4.0.120)
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.245 | 0 | 8/31/2026 |
| 4.0.244 | 0 | 8/31/2026 |
| 4.0.243 | 33 | 8/30/2026 |
| 4.0.242 | 50 | 8/30/2026 |
| 4.0.241 | 48 | 8/28/2026 |
| 4.0.240 | 59 | 8/26/2026 |
| 4.0.239 | 48 | 8/26/2026 |
| 4.0.238 | 44 | 8/26/2026 |
| 4.0.237 | 52 | 8/26/2026 |
| 4.0.236 | 68 | 8/25/2026 |
| 4.0.235 | 91 | 8/22/2026 |
| 4.0.234 | 103 | 8/22/2026 |
| 4.0.233 | 89 | 8/22/2026 |
| 4.0.232 | 89 | 8/21/2026 |
| 4.0.231 | 108 | 8/20/2026 |
| 4.0.230 | 102 | 8/20/2026 |
| 4.0.229 | 97 | 8/19/2026 |
| 4.0.228 | 93 | 8/18/2026 |
| 4.0.227 | 94 | 8/18/2026 |
| 4.0.226 | 133 | 8/16/2026 |
Update dependency Soenneker.HubSpot.Client to 4.0.136 (#375)