How to install
Install the package from NuGet.Bash
C#
Migration guide for .NET SDK v8
Version 8 migrates the SDK from Server API v3 to v4. This is a breaking change. This section summarizes the most important changes from previous versions.Package and namespace rename
The package name changed fromFingerprintPro.ServerSdk to Fingerprint.ServerSdk, and all namespaces changed from FingerprintPro.ServerSdk.* to Fingerprint.ServerSdk.*.
Project.csproj
C#
Client construction
In v7, you created aConfiguration object and passed it to a FingerprintApi constructor. In v8, you register a service on a generichost builder with AddFingerprint and resolve it as IFingerprintApi.
C#
Async methods and response objects
All API methods are now asynchronous and return a response object instead of the deserialized model directly. UseIsOk and Ok() to access the result, or the TryOk helper.
C#
requestId renamed to eventId
Server API v4 renamed the request_id parameter to event_id, so the identifier passed to GetEventAsync and UpdateEventAsync is now called eventId.
C#
Event structure
GetEventAsync returns an Event with a flatter structure. The data that was previously nested under Products.<signal>.Data is now available at the top level.
C#
Search events
SearchEventsAsync takes a SearchEventsRequest builder instead of positional and named arguments.
C#
GetVisits and GetRelatedVisitors removed
GetVisits and GetRelatedVisitors have been removed. Use SearchEventsAsync with WithVisitorId to get the events for a visitor.
C#
Handling sealed client results from a v3 JavaScript agent
.NET SDK v8 will fail to deserialize the decrypted payload of a sealed client result sent by a v3 JavaScript agent into anEvent because the payload is an EventsGetResponse (i.e., the v3 event format), not an Event.
To upgrade to .NET SDK v8 without requiring a concurrent upgrade to the v4 JavaScript agent, you can fall back to using the Server API if unsealing the sealed client results fails.
To enable this fallback path, your frontend must send the event ID alongside the sealed client results, as recommended by the sealed client results guide.
Instead of Sealed.UnsealEventResponse, which decrypts and deserializes in one call, use Sealed.Unseal to decrypt the payload and then deserialize it into an Event separately. This lets you detect a deserialization failure and fall back to the Server API, which also returns an Event.
C#