> ## Documentation Index
> Fetch the complete documentation index at: https://leadping.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# .NET SDK

> Install the Leadping .NET SDK from NuGet, configure Kiota authentication, create a request adapter, and call Leadping API endpoints.

* Package: [Leadping.OpenApiClient on NuGet](https://www.nuget.org/packages/Leadping.OpenApiClient)
* Repository: [leadpingai/leadping-dotnet](https://github.com/leadpingai/leadping-dotnet)

## Install

```bash theme={null}
dotnet add package Leadping.OpenApiClient
```

Install a Kiota HTTP adapter in the application that will call Leadping:

```bash theme={null}
dotnet add package Microsoft.Kiota.Http.HttpClientLibrary
```

## Create a client

The SDK exposes `LeadpingOpenApiClient`. For most SDK integrations, pass it a Kiota request adapter that attaches `Authorization: Bearer lp_...`. Use `Authorization: Bearer <leadping_user_access_token>` only when acting as a signed-in user, and use `Authorization: Bearer lp_src_...` only when intentionally calling lead ingestion endpoints.

```csharp theme={null}
using Leadping.OpenApiClient;
using Microsoft.Kiota.Abstractions;

IRequestAdapter requestAdapter = CreateLeadpingRequestAdapter();
var client = new LeadpingOpenApiClient(requestAdapter);

var me = await client.Users.Me.GetAsync();
```

`CreateLeadpingRequestAdapter` is your application code. The generated SDK does not own token storage or API key handling.

## Common calls

```csharp theme={null}
var source = await client.Sources["source-id"].GetAsync();
var lead = await client.Leads["lead-id"].GetAsync();
var currentUser = await client.Users.Me.GetAsync();
```

Use generated request body classes from the `Leadping.OpenApiClient` namespace when creating or updating records.
