Soenneker.HubSpot.Client
4.0.173
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.HubSpot.Client --version 4.0.173
NuGet\Install-Package Soenneker.HubSpot.Client -Version 4.0.173
<PackageReference Include="Soenneker.HubSpot.Client" Version="4.0.173" />
<PackageVersion Include="Soenneker.HubSpot.Client" Version="4.0.173" />
<PackageReference Include="Soenneker.HubSpot.Client" />
paket add Soenneker.HubSpot.Client --version 4.0.173
#r "nuget: Soenneker.HubSpot.Client, 4.0.173"
#:package Soenneker.HubSpot.Client@4.0.173
#addin nuget:?package=Soenneker.HubSpot.Client&version=4.0.173
#tool nuget:?package=Soenneker.HubSpot.Client&version=4.0.173
Soenneker.HubSpot.Client
Reuse HubSpot HTTP clients authenticated with one or more private app access tokens.
Install
dotnet add package Soenneker.HubSpot.Client
Configure a default account
{
"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.Client.Registrars;
services.AddHubSpotClientUtilAsSingleton();
Use AddHubSpotClientUtilAsScoped() when each scope should own its client set. Provider instances use isolated cache keys, so disposing one scope removes only the HTTP clients created by that provider.
Usage
using Soenneker.HubSpot.Client.Abstract;
HttpClient client = await hubSpotClient.Get(cancellationToken);
HttpResponseMessage response = await client.GetAsync(
"crm/v3/objects/contacts",
cancellationToken);
response.EnsureSuccessStatusCode();
The returned client targets https://api.hubapi.com/ and sends Authorization: Bearer <token>.
To work with multiple HubSpot accounts, pass each private app access token explicitly:
HttpClient tenantClient = await hubSpotClient.Get(
tenantAccessToken,
cancellationToken);
Repeated calls with the same token on the same provider reuse a client. Distinct tokens receive separate clients, preventing credentials from leaking between accounts.
The provider owns returned clients. Let the service container dispose the provider rather than disposing individual cached clients.
| 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.Extensions.Configuration (>= 4.0.895)
- Soenneker.Hashing.XxHash (>= 4.0.100)
- Soenneker.Utils.HttpClientCache (>= 4.0.2088)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.HubSpot.Client:
| Package | Downloads |
|---|---|
|
Soenneker.HubSpot.OpenApiClientUtil
Provides cached HubSpot generated clients for one or more private app access tokens |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.183 | 0 | 9/29/2026 |
| 4.0.182 | 0 | 9/29/2026 |
| 4.0.181 | 60 | 9/26/2026 |
| 4.0.180 | 56 | 9/25/2026 |
| 4.0.179 | 39 | 9/25/2026 |
| 4.0.178 | 53 | 9/25/2026 |
| 4.0.177 | 49 | 9/25/2026 |
| 4.0.176 | 52 | 9/24/2026 |
| 4.0.175 | 197 | 9/17/2026 |
| 4.0.174 | 113 | 9/16/2026 |
| 4.0.173 | 122 | 9/16/2026 |
| 4.0.172 | 105 | 9/16/2026 |
| 4.0.171 | 84 | 9/16/2026 |
| 4.0.170 | 90 | 9/16/2026 |
| 4.0.169 | 119 | 9/15/2026 |
| 4.0.168 | 144 | 9/13/2026 |
| 4.0.167 | 90 | 9/13/2026 |
| 4.0.166 | 105 | 9/13/2026 |
| 4.0.165 | 102 | 9/13/2026 |
| 4.0.164 | 103 | 9/13/2026 |
Updated Multiple NuGet packages