VerifIP 0.2.0
dotnet add package VerifIP --version 0.2.0
NuGet\Install-Package VerifIP -Version 0.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="VerifIP" Version="0.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="VerifIP" Version="0.2.0" />
<PackageReference Include="VerifIP" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add VerifIP --version 0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: VerifIP, 0.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package VerifIP@0.2.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=VerifIP&version=0.2.0
#tool nuget:?package=VerifIP&version=0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
VerifIP .NET SDK
Official .NET SDK for the VerifIP IP fraud risk scoring API.
Installation
dotnet add package VerifIP
Or via NuGet Package Manager:
Install-Package VerifIP
Quick Start
using VerifIP;
var client = new VerifIPClient("vip_your_api_key");
var result = await client.CheckAsync("185.220.101.1");
Console.WriteLine(result.FraudScore); // 70
Console.WriteLine(result.IsTor); // true
Console.WriteLine(result.SignalBreakdown); // {"tor_exit": 25, ...}
Methods
CheckAsync(ip, cancellationToken)
Check a single IPv4 or IPv6 address.
var result = await client.CheckAsync("185.220.101.1");
result.RequestId // UUID
result.Ip // "185.220.101.1"
result.FraudScore // 0-100
result.IsProxy // bool
result.IsVpn // bool
result.IsTor // bool
result.IsDatacenter // bool
result.CountryCode // "DE"
result.CountryName // "Germany"
result.Region // "Brandenburg"
result.City // "Brandenburg"
result.Isp // "Stiftung Erneuerbare Freiheit"
result.Asn // 60729
result.ConnectionType // "Data Center"
result.Hostname // "tor-exit.example.org"
result.SignalBreakdown // Dictionary<string, int>
CheckBatchAsync(ips, cancellationToken)
Check up to 100 IPs. Requires Starter plan or higher.
var batch = await client.CheckBatchAsync(new[] { "185.220.101.1", "8.8.8.8" });
foreach (var result in batch.Results)
Console.WriteLine($"{result.Ip}: {result.FraudScore}");
HealthAsync(cancellationToken)
Check API server health (no authentication required).
var health = await client.HealthAsync();
Console.WriteLine(health.Status); // "ok"
Error Handling
using VerifIP.Exceptions;
try
{
var result = await client.CheckAsync("1.2.3.4");
}
catch (AuthenticationException)
{
// 401/403: invalid or disabled API key
}
catch (RateLimitException ex)
{
// 429: daily limit exceeded
Console.WriteLine($"Retry after {ex.RetryAfter} seconds");
}
catch (InvalidRequestException)
{
// 400: malformed or private IP
}
catch (VerifIPException ex)
{
// Catch-all for any API error
Console.WriteLine($"Error {ex.StatusCode}: {ex.ErrorCode}");
}
Rate Limits
await client.CheckAsync("8.8.8.8");
if (client.RateLimit != null)
{
Console.WriteLine($"{client.RateLimit.Remaining}/{client.RateLimit.Limit} requests left");
Console.WriteLine($"Resets at {client.RateLimit.Reset}");
}
Configuration
var client = new VerifIPClient("vip_your_key", new VerifIPClientOptions
{
BaseUrl = "https://api.verifip.com", // default
Timeout = TimeSpan.FromSeconds(30), // default
MaxRetries = 3, // default
HttpClient = myCustomHttpClient // optional
});
| Option | Default | Description |
|---|---|---|
BaseUrl |
https://api.verifip.com |
API base URL |
Timeout |
30 seconds | Request timeout |
MaxRetries |
3 | Retries on 429/5xx with exponential backoff |
HttpClient |
null | Custom HttpClient (overrides BaseUrl/Timeout) |
Retry Behavior
Automatic retry on HTTP 429 and 5xx with exponential backoff:
- Delay:
min(retry_after or 0.5 * 2^attempt, 30) + jitter - Respects
retry_afterfrom rate limit responses - Connection errors are also retried
- Supports
CancellationTokenfor cancellation
Requirements
- .NET 6.0 or .NET 8.0
- Zero external dependencies (uses
System.Net.HttpandSystem.Text.Json) - Implements
IDisposablefor proper HttpClient cleanup
Links
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.