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

```powershell
Install-Package Enzoic
```

## 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 supported APIs:

```csharp
// Create a new Enzoic instance - this is our primary interface for making API calls
Enzoic enzoic = new Enzoic("YOUR_API_KEY", "YOUR_API_SECRET");
 
// Check whether a password has been compromised
if (enzoic.CheckPassword("password-to-test")) {
    Console.WriteLine("Password is compromised");
}
else {
    Console.WriteLine("Password is not compromised");
}
 
// Check whether a specific set of credentials are compromised
if (enzoic.CheckCredentials("test@enzoic.com", "password-to-test")) {
    Console.WriteLine("Credentials are compromised");
}
else {
    Console.WriteLine("Credentials are not compromised");
}

// Use the optional parameters on the CheckCredentials call to tweak performance 
// by including the date/time of the last check and excluding BCrypt
if (enzoic.CheckCredentials("test@enzoic.com", "password-to-test",
        lastCheckTimestamp, new PasswordType[] { PasswordType.BCrypt })) {
    Console.WriteLine("Credentials are compromised");
}
else {
    Console.WriteLine("Credentials are not compromised");
}

 
// get all exposures for a given user
ExposuresResponse exposures = enzoic.GetExposuresForUser("test@enzoic.com");
Console.WriteLine(exposures.Count + " exposures found for test@enzoic.com");
 
// now get the full details for the first exposure returned in the exposures response
ExposureDetails details = enzoic.GetExposureDetails(exposures.Exposures[0]);
Console.WriteLine("First exposure for test@enzoic.com was " + details.Title);

// get all passwords for a given user-requires special approval, contact Enzoic sales
UserPasswords userPasswords = enzoic.GetUserPasswords("eicar_0@enzoic.com");
Console.WriteLine("First password for eicar_0@enzoic.com was " + 
    userPasswords.Passwords[0].Password);
```

## 4.  Learn More

That should get you started. Check out the [GitHub project page](https://github.com/Enzoic/enzoic-dotnet-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/.net-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.
