Soenneker.HubSpot.Client 4.0.194

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.HubSpot.Client --version 4.0.194
                    
NuGet\Install-Package Soenneker.HubSpot.Client -Version 4.0.194
                    
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.Client" Version="4.0.194" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.HubSpot.Client" Version="4.0.194" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.HubSpot.Client" />
                    
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.Client --version 4.0.194
                    
#r "nuget: Soenneker.HubSpot.Client, 4.0.194"
                    
#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.Client@4.0.194
                    
#: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.Client&version=4.0.194
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.HubSpot.Client&version=4.0.194
                    
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.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 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.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
11.0.215 110 10/27/2026
11.0.214 95 10/27/2026
11.0.213 98 10/27/2026
11.0.212 93 10/26/2026
11.0.211 89 10/26/2026
11.0.210 123 10/26/2026
4.0.209 101 10/26/2026
4.0.208 262 10/15/2026
4.0.207 90 10/15/2026
4.0.206 104 10/14/2026
4.0.204 108 10/14/2026
4.0.203 85 10/14/2026
4.0.202 101 10/14/2026
4.0.201 103 10/14/2026
4.0.194 114 10/13/2026
4.0.193 94 10/13/2026
4.0.191 109 10/12/2026
4.0.190 104 10/12/2026
4.0.189 92 10/12/2026
4.0.188 100 10/11/2026
Loading failed

Use trim-safe configuration value lookups