> ## 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.

# Go SDK

> Install the Leadping Go SDK module, configure Kiota authentication, create a request adapter, and call Leadping API endpoints from Go services.

* Module and repository: [github.com/leadpingai/leadping-go](https://github.com/leadpingai/leadping-go)

## Install

```bash theme={null}
go get github.com/leadpingai/leadping-go
```

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

```bash theme={null}
go get github.com/microsoft/kiota-http-go
```

## Create a client

The SDK exposes `NewLeadpingOpenApiClient`. 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.

```go theme={null}
package main

import (
    "context"

    leadping "github.com/leadpingai/leadping-go"
)

func main() {
    ctx := context.Background()
    requestAdapter := createLeadpingRequestAdapter()
    client := leadping.NewLeadpingOpenApiClient(requestAdapter)

    me, err := client.Users().Me().Get(ctx, nil)
    if err != nil {
        panic(err)
    }

    _ = me
}
```

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

## Common calls

```go theme={null}
source, err := client.Sources().ById("source-id").Get(ctx, nil)
lead, err := client.Leads().ById("lead-id").Get(ctx, nil)
currentUser, err := client.Users().Me().Get(ctx, nil)
```

Use generated request body interfaces from the module when creating or updating records.
