# Go Quick Start

## 1.  Get an API Key and Secret

If you haven’t already, [sign up for a free trial](https://www.enzoic.com/free-trial).

## 2.  Install the Enzoic Library in Your Project

Use Nuget to install the Enzoic package in your project:

```bash
go get github.com/enzoic/enzoic-go-client
```

## 3.  Try Out Our Example Code

We’ve made calling the API dead simple. This sample code snippet shows you examples of calling the four primary APIs:

```go
package main

import (
	"fmt"
	"github.com/enzoic/enzoic-go-client"
	"os"
	"strconv"
	"time"
)

func main() {
	enzoicClient, err := enzoic.NewClient(os.Getenv("PP_API_KEY"), os.Getenv("PP_API_SECRET"))
	if err != nil {
		panic(err)
	}

	/////////////////////// Passwords API Example ///////////////////////
	// Check whether a password has been compromised
	passwordCompromised, err := enzoicClient.CheckPassword("password-to-test")
	if err != nil {
		panic(err)
	}

	if passwordCompromised {
		fmt.Println("Password is compromised")
	} else {
		fmt.Println("Password is not compromised")
	}

	////////////////////// Credentials API Example //////////////////////
	// Check whether a specific set of credentials are compromised
	credsCompromised, err := enzoicClient.CheckCredentials("test@enzoic.com", "password-to-test")
	if err != nil {
		panic(err)
	}

	if credsCompromised {
		fmt.Println("Credentials are compromised")
	} else {
		fmt.Println("Credentials are not compromised")
	}

	/////////////////////// Exposures API Example ///////////////////////
	// Get all exposures for the given user
	exposuresForUser, err := enzoicClient.GetExposuresForUser("eicar_0@enzoic.com")
	if err != nil {
		panic(err)
	}
	fmt.Println(len(exposuresForUser), "exposures found for eicar_0@enzoic.com")

	// now get the full details for the first exposure returned in the list
	exposureDetails, err := enzoicClient.GetExposureDetails(exposuresForUser[0])
	if err != nil {
		panic(err)
	}
	fmt.Println("First exposure for test@enzoic.com was", exposureDetails.Title)
}

```

## 4.  Learn More

That should get you started. Check out the [GitHub project page](https://github.com/Enzoic/enzoic-go-client) for more details.  Make sure you also review the [Using the Enzoic API](/enzoic-api-developer-documentation/using-the-enzoic-api.md) page.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.enzoic.com/enzoic-api-developer-documentation/getting-started/go-quick-start.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
