InsionInsion
C#

Configuration

Configure .NET authentication, retries, timeouts, and request overrides

Overview

Configuration is optional. The SDK's defaults are suitable for most integrations, so you only need this guide when you want fine-grained control over behavior such as retries, timeouts, and per-request overrides.

using Insion;

var client = new InsionClient("<token>", new ClientOptions
{
    Timeout = TimeSpan.FromSeconds(30),
    MaxRetries = 2,
});

Keep the API key on a trusted server. Never expose it in client applications, logs, or source control.

ClientOptions also supports an HttpClient and additional headers. The default request timeout is 30 seconds and the default retry limit is two.

Per-request options

var page = await client.ListRecordsAsync(
    new GetApiV1RecordsRequest { Limit = 50 },
    new RequestOptions
    {
        Timeout = TimeSpan.FromSeconds(10),
        MaxRetries = 0,
        AdditionalHeaders = new Dictionary<string, string> { ["X-Request-ID"] = "req-123" },
    },
    cancellationToken
);

Request settings override client settings for that call. Every method accepts a CancellationToken.

How is this guide?

On this page

Latest Release

View the C# SDK on NuGetC# SDK versionC# SDK license