Soenneker.Close.OpenApiClientUtil
4.0.85
Prefix Reserved
dotnet add package Soenneker.Close.OpenApiClientUtil --version 4.0.85
NuGet\Install-Package Soenneker.Close.OpenApiClientUtil -Version 4.0.85
<PackageReference Include="Soenneker.Close.OpenApiClientUtil" Version="4.0.85" />
<PackageVersion Include="Soenneker.Close.OpenApiClientUtil" Version="4.0.85" />
<PackageReference Include="Soenneker.Close.OpenApiClientUtil" />
paket add Soenneker.Close.OpenApiClientUtil --version 4.0.85
#r "nuget: Soenneker.Close.OpenApiClientUtil, 4.0.85"
#:package Soenneker.Close.OpenApiClientUtil@4.0.85
#addin nuget:?package=Soenneker.Close.OpenApiClientUtil&version=4.0.85
#tool nuget:?package=Soenneker.Close.OpenApiClientUtil&version=4.0.85
Soenneker.Close.OpenApiClientUtil
Provides an authenticated, cached instance of the Kiota-generated Close CRM API client.
Installation
dotnet add package Soenneker.Close.OpenApiClientUtil
API-key configuration
{
"Close": {
"ApiKey": "<Close API key>",
"ClientBaseUrl": "https://api.close.com/api/v1"
}
}
Close:ApiKey is required. The utility uses Close's HTTP Basic API-key scheme by default: the key is the username and the password is empty. See Close's authentication documentation.
For OAuth, place the access token in Close:ApiKey and set Close:AuthHeaderValueTemplate to Bearer {token}. Close:AuthHeaderName can override the default Authorization header name.
Keep API keys and OAuth tokens in a secret provider rather than source control.
Registration
using Microsoft.Extensions.DependencyInjection;
using Soenneker.Close.OpenApiClientUtil.Registrars;
services.AddCloseOpenApiClientUtilAsSingleton();
Use AddCloseOpenApiClientUtilAsScoped() when each dependency-injection scope should own its generated client and request adapter while sharing the singleton HTTP provider.
Usage
using Soenneker.Close.OpenApiClient.Me;
using Soenneker.Close.OpenApiClientUtil.Abstract;
public sealed class CloseProfileService
{
private readonly ICloseOpenApiClientUtil _closeClients;
public CloseProfileService(ICloseOpenApiClientUtil closeClients)
{
_closeClients = closeClients;
}
public async ValueTask<MeGetResponse?> GetCurrentUser(
CancellationToken cancellationToken)
{
var close = await _closeClients.Get(cancellationToken);
return await close.Me.GetAsync(
request =>
{
request.QueryParameters.Fields = "id,name,organization_id";
},
cancellationToken);
}
}
Other root request builders include Lead, Contact, Opportunity, Activity, Task, Sequence, and Webhook. Names follow the generated OpenAPI surface.
Lifecycle and behavior
- The first
Getcreates the HTTP client, Kiota request adapter, and generated client. Later calls on the same utility return that client. - Configuration and credentials are captured during first initialization. Recreate the owning scope or application instance after rotating them.
- The token passed to
Getcancels initialization only. Pass a cancellation token to each generated endpoint call. - Let dependency injection dispose
ICloseOpenApiClientUtil. Disposal releases its request adapter; the singleton HTTP provider and cachedHttpClientremain available until application shutdown. - Generated endpoint methods may return
nullwhen the schema permits an empty response. - Service failures are surfaced through generated error models or Kiota exceptions according to each endpoint's schema mapping.
- Request builders and models can change when the generated-client package is refreshed from Close's OpenAPI description.
| 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.Close.HttpClients (>= 4.0.74)
- Soenneker.Close.OpenApiClient (>= 4.0.45)
- Soenneker.Kiota.GenericAuthenticationProvider (>= 4.0.45)
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.85 | 0 | 9/15/2026 |
| 4.0.84 | 35 | 9/13/2026 |
| 4.0.83 | 40 | 9/13/2026 |
| 4.0.82 | 48 | 9/13/2026 |
| 4.0.81 | 42 | 9/13/2026 |
| 4.0.79 | 46 | 9/12/2026 |
| 4.0.78 | 37 | 9/12/2026 |
| 4.0.77 | 36 | 9/12/2026 |
| 4.0.76 | 42 | 9/12/2026 |
| 4.0.74 | 50 | 9/10/2026 |
| 4.0.73 | 45 | 9/9/2026 |
| 4.0.72 | 45 | 9/9/2026 |
| 4.0.71 | 65 | 9/9/2026 |
| 4.0.70 | 68 | 9/8/2026 |
| 4.0.69 | 81 | 9/8/2026 |
| 4.0.68 | 87 | 9/8/2026 |
| 4.0.67 | 84 | 9/8/2026 |
| 4.0.66 | 86 | 9/8/2026 |
| 4.0.65 | 98 | 9/7/2026 |
| 4.0.64 | 97 | 9/7/2026 |