Fingerprint is a device intelligence platform offering 99.5% accurate visitor identification. Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. It can be used for data exports, decision-making, and data analysis scenarios. Server API is intended for server-side usage, it's not intended to be used from the client side, whether it's a browser or a mobile device.
This C# SDK is automatically generated by the Swagger Codegen project:
- API version: 3
- SDK version: 7.1.0
- Build package: io.swagger.codegen.v3.generators.dotnet.CSharpClientCodegen
- .NET 8.0 or later (we keep the Microsoft support policy)
We recommend installing the package from NuGet:
dotnet add package FingerprintPro.ServerSdk
// See https://aka.ms/new-console-template for more information
// Example usage of our SDK
// Import namespaces
using FingerprintPro.ServerSdk.Api;
using FingerprintPro.ServerSdk.Client;
// Initialize configuration and add your api key
var configuration = new Configuration(Environment.GetEnvironmentVariable("API_KEY")!);
var api = new FingerprintApi(
configuration
);
var requestId = Environment.GetEnvironmentVariable("REQUEST_ID")!;
var visitorId = Environment.GetEnvironmentVariable("VISITOR_ID")!;
var visits = api.GetVisits(visitorId);
var events = api.GetEvent(requestId);
Console.WriteLine(visits);
Console.WriteLine(events);
var tag = new Tag
{
["key"] = "value"
};
var body = new EventsUpdateRequest()
{
Suspect = false,
Tag = tag,
LinkedId = "<linked_id>"
};
api.UpdateEvent(body, requestId);
You can also access the raw HTTP response by using the WithHttpInfo
methods:
// See https://aka.ms/new-console-template for more information
// Example usage of our SDK
// Import namespaces
using FingerprintPro.ServerSdk.Api;
using FingerprintPro.ServerSdk.Client;
// Initialize configuration and add your api key
var configuration = new Configuration(Environment.GetEnvironmentVariable("API_KEY")!);
var api = new FingerprintApi(
configuration
);
var requestId = Environment.GetEnvironmentVariable("REQUEST_ID")!;
var visitorId = Environment.GetEnvironmentVariable("VISITOR_ID")!;
var visits = api.GetVisitsWithHttpInfo(visitorId);
// HttpResponseMessage
Console.WriteLine(visits.Response);
// Response data
Console.WriteLine(visits.Data);
You can view more examples in src/FingerprintPro.ServerSdk.Examples/Program.cs.
If your subscription is in region other than US, you need to change the region in the configuration:
using FingerprintPro.ServerSdk.Client;
var configuration = new Configuration(Environment.GetEnvironmentVariable("API_KEY")!)
{
Region = Region.Eu // or Region.Asia
};
This SDK provides utility methods for decoding sealed results.
using FingerprintPro.ServerSdk;
var sealedResult = Environment.GetEnvironmentVariable("BASE64_SEALED_RESULT")!;
var sealedKey = Environment.GetEnvironmentVariable("BASE64_KEY")!;
var events = Sealed.UnsealEventResponse(Convert.FromBase64String(sealedResult), new[]
{
new Sealed.DecryptionKey(Convert.FromBase64String(sealedKey), Sealed.DecryptionAlgorithm.Aes256Gcm)
});
Console.WriteLine(events.ToJson());
To learn more, refer to example located in src/FingerprintPro.ServerSdk.SealedResultExample/Program.cs.
This SDK provides utility method for verifying the HMAC signature of the incoming webhook request.
namespace FingerprintAspNetCore.Areas.Identity.Pages;
using FingerprintPro.ServerSdk;
using Microsoft.AspNetCore.Mvc;
using System;
using System.IO;
using System.Threading.Tasks;
[Route("api/[controller]")]
[ApiController]
public class WebhookController : ControllerBase
{
[HttpPost]
public async Task<IActionResult> Post()
{
try
{
var secret = Environment.GetEnvironmentVariable("WEBHOOK_SIGNATURE_SECRET");
if (string.IsNullOrEmpty(secret))
{
return BadRequest(new { message = "Secret key is not configured." });
}
var header = Request.Headers["fpjs-event-signature"].ToString();
if (string.IsNullOrEmpty(header))
{
return BadRequest(new { message = "Missing fpjs-event-signature header." });
}
using var memoryStream = new MemoryStream();
await Request.Body.CopyToAsync(memoryStream);
var data = memoryStream.ToArray();
// Validate webhook signature
var isValid = WebhookValidation.IsValidSignature(
header,
data,
secret);
if (!isValid)
{
return Forbid(new { message = "Webhook signature is invalid." });
}
// Process the webhook data here
return Ok(new { message = "Webhook received." });
}
catch (Exception e)
{
return StatusCode(500, new { error = e.Message });
}
}
}
To learn more, refer to example located in src/FingerprintPro.ServerSdk.WebhookExample/Program.cs.
All URIs are relative to https://api.fpjs.io
Class | Method | HTTP request | Description |
---|---|---|---|
FingerprintApi | DeleteVisitorData | DELETE /visitors/{visitor_id} | Delete data by visitor ID |
FingerprintApi | GetEvent | GET /events/{request_id} | Get event by request ID |
FingerprintApi | GetRelatedVisitors | GET /related-visitors | Get Related Visitors |
FingerprintApi | GetVisits | GET /visitors/{visitor_id} | Get visits by visitor ID |
FingerprintApi | UpdateEvent | PUT /events/{request_id} | Update an event with a given request ID |
- Model.Botd
- Model.BotdBot
- Model.BotdBotResult
- Model.BrowserDetails
- Model.ClonedApp
- Model.DeprecatedGeolocation
- Model.DeveloperTools
- Model.Emulator
- Model.Error
- Model.ErrorCode
- Model.ErrorPlainResponse
- Model.ErrorResponse
- Model.EventsGetResponse
- Model.EventsUpdateRequest
- Model.FactoryReset
- Model.Frida
- Model.Geolocation
- Model.GeolocationCity
- Model.GeolocationContinent
- Model.GeolocationCountry
- Model.GeolocationSubdivision
- Model.GeolocationSubdivisions
- Model.HighActivity
- Model.IPBlocklist
- Model.IPBlocklistDetails
- Model.IPInfo
- Model.IPInfoASN
- Model.IPInfoDataCenter
- Model.IPInfoV4
- Model.IPInfoV6
- Model.Identification
- Model.IdentificationConfidence
- Model.IdentificationSeenAt
- Model.Incognito
- Model.Jailbroken
- Model.LocationSpoofing
- Model.PrivacySettings
- Model.ProductBotd
- Model.ProductClonedApp
- Model.ProductDeveloperTools
- Model.ProductEmulator
- Model.ProductFactoryReset
- Model.ProductFrida
- Model.ProductHighActivity
- Model.ProductIPBlocklist
- Model.ProductIPInfo
- Model.ProductIdentification
- Model.ProductIncognito
- Model.ProductJailbroken
- Model.ProductLocationSpoofing
- Model.ProductPrivacySettings
- Model.ProductProxy
- Model.ProductRawDeviceAttributes
- Model.ProductRemoteControl
- Model.ProductRootApps
- Model.ProductSuspectScore
- Model.ProductTampering
- Model.ProductTor
- Model.ProductVPN
- Model.ProductVelocity
- Model.ProductVirtualMachine
- Model.Products
- Model.Proxy
- Model.RawDeviceAttribute
- Model.RawDeviceAttributeError
- Model.RawDeviceAttributes
- Model.RelatedVisitor
- Model.RelatedVisitorsResponse
- Model.RemoteControl
- Model.RootApps
- Model.SuspectScore
- Model.Tag
- Model.Tampering
- Model.Tor
- Model.VPN
- Model.VPNConfidence
- Model.VPNMethods
- Model.Velocity
- Model.VelocityData
- Model.VelocityIntervals
- Model.VirtualMachine
- Model.Visit
- Model.VisitorsGetResponse
- Model.Webhook
- Model.WebhookClonedApp
- Model.WebhookDeveloperTools
- Model.WebhookEmulator
- Model.WebhookFactoryReset
- Model.WebhookFrida
- Model.WebhookHighActivity
- Model.WebhookIPBlocklist
- Model.WebhookIPInfo
- Model.WebhookJailbroken
- Model.WebhookLocationSpoofing
- Model.WebhookPrivacySettings
- Model.WebhookProxy
- Model.WebhookRawDeviceAttributes
- Model.WebhookRemoteControl
- Model.WebhookRootApps
- Model.WebhookSuspectScore
- Model.WebhookTampering
- Model.WebhookTor
- Model.WebhookVPN
- Model.WebhookVelocity
- Model.WebhookVirtualMachine
- Type: API key
- API key parameter name: Auth-API-Key
- Location: HTTP header
- Type: API key
- API key parameter name: api_key
- Location: URL query string
To report problems, ask questions or provide feedback, please use Issues. If you need private support, you can email us at [email protected].
This project is licensed under the MIT license.