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

# Go Server SDK

> The [Fingerprint Server Go SDK](https://github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk) is an easy way to interact with our Server API from your Go application. You can retrieve visitor history or individual identification events. View our [Go Server SDK quickstart](/docs/go-server-quickstart) for a step-by-step guide to get started.

export const DeprecatedVersion = ({currentPath}) => <Warning>
    This version is deprecated. See the{" "}
    <a href="/reference/api-deprecation-policy">deprecation policy</a> and use
    the <a href={currentPath}>current version</a> instead.
  </Warning>;

<DeprecatedVersion currentPath="/reference/go-server-sdk" />

### How to install

Get the package from GitHub using `go get`.

```bash Bash theme={"theme":"github-dark-dimmed"}
go get github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/v7/sdk
```

Initialize the client instance and use it to make API requests. You need to specify your secret API key and region (if it is not US/Global).

```go Go theme={"theme":"github-dark-dimmed"}
package main

import (
  "context"
  "fmt"
  "github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/v7/sdk"
  "log"
)

func main() {
  cfg := sdk.NewConfiguration()
  client := sdk.NewAPIClient(cfg)

  auth := context.WithValue(
    context.Background(),
    sdk.ContextAPIKey,
    sdk.APIKey{Key: "SECRET_API_KEY"},
  )
  // cfg.ChangeRegion(sdk.RegionEU)

  // Get visit history of a specific visitor
  getVisitsOpts := sdk.FingerprintApiGetVisitsOpts{
    Limit: 10,
  }
  visits, visitsHttpRes, visitsErr :=
    client.FingerprintApi.GetVisits(auth, "<visitorId", &getVisitsOpts)
  if visitsErr != nil {
    log.Fatal(visitsErr)
  }
  fmt.Printf("Visitor history: %s", visits, visitsHttpRes)

  // Get a specific identification event
  event, eventHttpRes, eventErr :=
    client.FingerprintApi.GetEvent(auth, "REQUEST_ID")
  if eventErr != nil {
    log.Fatal(eventErr)
  }
  fmt.Printf("Event: %s", event, eventHttpRes)
}
```

### Documentation

You can find the full documentation in the official [GitHub repository](https://github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk). The repository also contains [an example app](https://github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/tree/main/example) demonstrating the usage of the library.
