SDKs
Official Prynt SDKs for every major platform. Client SDKs collect device signals and identify visitors. Server SDKs verify identifications, query events, and manage rules.
Overview
Prynt provides first-party SDKs for 12 platforms, covering browser, mobile, and server environments. All SDKs follow the same identify on the client, verify on the server pattern.
Supported platforms
| SDK | Package | Type | Latest version |
|---|---|---|---|
| JavaScript | @prynt/sdk | Client | 3.8.2 |
| React | @prynt/react | Client | 2.5.0 |
| iOS (Swift) | PryntSDK | Client | 4.1.0 |
| Android (Kotlin) | com.prynt:prynt-android | Client | 3.2.1 |
| Flutter | prynt_flutter | Client | 1.4.0 |
| React Native | @prynt/react-native | Client | 2.1.3 |
| Node.js | @prynt/node | Server | 5.0.1 |
| Python | prynt-sdk | Server | 3.3.0 |
| Go | prynt-go | Server | 1.6.2 |
| Java | com.prynt:prynt-java | Server | 2.4.0 |
| Ruby | prynt | Server | 1.2.1 |
| .NET | Prynt.SDK | Server | 0.9.0-beta |
Versioning policy
All Prynt SDKs follow semantic versioning (semver). Major versions indicate breaking changes, minor versions add features, and patch versions fix bugs. We support the current and previous major version with security patches. Deprecated versions receive 12 months of security-only updates after a new major release.
JavaScript SDK
The core client SDK for browser environments. Collects device signals and returns a persistent visitorId. Lightweight (~12KB gzipped) with zero dependencies.
Installation
# npm npm install @prynt/sdk # yarn yarn add @prynt/sdk # CDN (no build step) <script src="https://cdn.prynt.io/v3/agent.js"></script>
Quick start
import { Prynt } from '@prynt/sdk'; const prynt = new Prynt({ apiKey: 'pk_live_xxxxxxxxxxxx', region: 'us', }); // Identify the current visitor const result = await prynt.identify(); console.log(result.visitorId); // "pv_8kX2mNqR3jT7p" console.log(result.requestId); // "req_1707832921_a7f2c9"
Configuration options
| Parameter | Type | Description |
|---|---|---|
| apiKeyRequired | string | Your public API key (pk_live_...). Safe to include in client code. |
| region | string | Data residency region.Default: "us" · Options: "us" "eu" "ap" |
| endpoint | string | Custom subdomain proxy for ad-blocker bypass.Default: null |
| timeout | number | Request timeout in milliseconds.Default: 10000 |
| debug | boolean | Enable verbose console logging for development.Default: false |
| disableCookies | boolean | Disable first-party cookie storage. Reduces accuracy slightly.Default: false |
Methods
| Method | Returns | Description |
|---|---|---|
| identify(options?) | Promise<Result> | Collects device signals and returns visitorId, requestId, and confidence. Call on key user actions (login, checkout, signup). |
| evaluate(tag?) | Promise<Evaluation> | Runs identification plus server-side rules evaluation. Returns verdict (allow, challenge, block) from the Rules Engine. |
| getVisitor() | Promise<Visitor> | Retrieves the cached visitor profile without making a new identification request. Returns null if no prior identification. |
Browser support
| Browser | Min version | Notes |
|---|---|---|
| Chrome | 60+ | Full support including Chromium-based browsers (Edge, Brave, Opera) |
| Firefox | 55+ | Full support |
| Safari | 12+ | Full support. ITP-resistant identification via first-party cookies. |
| Edge | 79+ | Chromium-based Edge. Legacy Edge (EdgeHTML) not supported. |
| Mobile browsers | varies | Chrome Mobile, Safari iOS 12+, Samsung Internet 8.2+, Firefox Mobile 55+ |
window.Prynt automatically. Use new window.Prynt({...}) instead of importing.React SDK
React bindings for the Prynt client SDK. Provides a context provider and hooks for seamless integration with React applications.
Installation
npm install @prynt/react
PryntProvider setup
import { PryntProvider } from '@prynt/react'; function App() { return ( <PryntProvider apiKey="pk_live_xxxxxxxxxxxx" region="us" > <YourApp /> </PryntProvider> ); }
usePrynt() hook
import { usePrynt } from '@prynt/react'; function LoginForm() { const { identify, isReady, error } = usePrynt(); const handleLogin = async () => { const { visitorId, requestId } = await identify(); // Send requestId to your server for verification await fetch('/api/login', { method: 'POST', body: JSON.stringify({ email, password, requestId, }), }); }; return ( <button onClick={handleLogin} disabled={!isReady} > Log in </button> ); }
iOS SDK (Swift)
Native iOS SDK for device identification on iPhone and iPad. Collects 56+ mobile-specific signals including hardware identifiers, motion sensors, and accessibility settings.
Requirements
| Requirement | Version |
|---|---|
| iOS | 13.0+ |
| Swift | 5.5+ |
| Xcode | 14.0+ |
Installation
// In Xcode: File → Add Package Dependencies // Enter the repository URL: https://github.com/prynt-io/prynt-ios-sdk
pod 'PryntSDK', '~> 4.1'
Quick start
import PryntSDK // Configure on app launch let prynt = Prynt( apiKey: "pk_live_xxxxxxxxxxxx", region: .us ) // Identify the device let result = try await prynt.identify() print(result.visitorId) // "pv_mB3nKq9xRt2Wp" print(result.requestId) // "req_1707832921_c4d8e1" print(result.confidence) // 0.998
Configuration
| Parameter | Type | Description |
|---|---|---|
| apiKeyRequired | String | Your public API key. |
| region | Region | Data residency region: .us, .eu, .apDefault: .us |
| timeout | TimeInterval | Request timeout in seconds.Default: 10.0 |
| extendedSignals | Bool | Collect additional hardware signals (GPU, motion, accessibility). Increases accuracy.Default: true |
Android SDK (Kotlin)
Native Android SDK for device identification. Supports phones, tablets, and Android TV. Collects 60+ hardware and software signals.
Requirements
| Requirement | Version |
|---|---|
| Android API | 21+ (Lollipop) |
| Kotlin | 1.6+ |
| Android Gradle Plugin | 7.0+ |
Installation
// Add to your app-level build.gradle.kts dependencies { implementation("com.prynt:prynt-android:3.2.1") }
Quick start
import com.prynt.sdk.Prynt import com.prynt.sdk.PryntConfig // Initialize in Application.onCreate() val config = PryntConfig.Builder("pk_live_xxxxxxxxxxxx") .region(Region.US) .build() val prynt = Prynt.init(context, config) // Identify the device lifecycleScope.launch { val result = prynt.identify() Log.d("Prynt", "Visitor: ${result.visitorId}") Log.d("Prynt", "Request: ${result.requestId}") }
consumerProguardFiles (default for Android libraries).Flutter SDK
Cross-platform Flutter plugin for device identification on iOS and Android from a single codebase. Wraps native SDKs for maximum signal accuracy.
Installation
dependencies: prynt_flutter: ^1.4.0
flutter pub get Quick start
import 'package:prynt_flutter/prynt_flutter.dart'; // Initialize the SDK final prynt = Prynt( apiKey: 'pk_live_xxxxxxxxxxxx', region: Region.us, ); // Identify the device final result = await prynt.identify(); print('Visitor: ${result.visitorId}'); print('Request: ${result.requestId}');
Platform-specific setup
NSAppTransportSecurity exception if using a custom endpoint. No additional pod install needed — the plugin handles native dependencies automatically.Android: Requires API 21+. Add
com.prynt:prynt-android to your app's build.gradle if using custom native modules alongside the Flutter plugin.
React Native SDK
React Native module with native bridges for iOS and Android. Uses the same hooks API as the React SDK for a familiar developer experience.
Installation
npm install @prynt/react-native # iOS: install native pods cd ios && pod install
Quick start
import { PryntProvider, usePrynt } from '@prynt/react-native'; function App() { return ( <PryntProvider apiKey="pk_live_xxxxxxxxxxxx"> <HomeScreen /> </PryntProvider> ); } function HomeScreen() { const { identify } = usePrynt(); const handlePress = async () => { const { visitorId, requestId } = await identify(); console.log(visitorId, requestId); }; return <Button onPress={handlePress} title="Identify" />; }
Linking native modules
react-native link @prynt/react-native. On iOS, run pod install after linking. On Android, rebuild with ./gradlew assembleDebug.Node.js Server SDK
Server-side SDK for Node.js. Verify identifications, query visitor history, and evaluate rules. Supports Node.js 16+ with full TypeScript definitions.
Installation
npm install @prynt/node
Server-side verification
import { PryntServer } from '@prynt/node'; const prynt = new PryntServer({ secretKey: process.env.PRYNT_SECRET_KEY, }); // Verify an identification event const event = await prynt.events.get('req_1707832921_a7f2c9'); console.log(event.visitorId); // "pv_8kX2mNqR3jT7p" console.log(event.confidence); // 0.995 console.log(event.signals.bot); // { detected: false } // Get visitor history const visitor = await prynt.visitors.get('pv_8kX2mNqR3jT7p'); console.log(visitor.totalEvents); // 142 // Evaluate rules for a request const eval = await prynt.evaluate('req_1707832921_a7f2c9'); console.log(eval.verdict); // "allow"
Available methods
| Method | Returns | Description |
|---|---|---|
| events.get(requestId) | Promise<Event> | Retrieve a verified identification event by request ID. |
| events.list(filters?) | Promise<EventList> | List events with optional filtering by visitor, date range, or signals. |
| visitors.get(visitorId) | Promise<Visitor> | Retrieve visitor profile with history and aggregated risk scores. |
| visitors.getEvents(id) | Promise<EventList> | List all identification events for a specific visitor. |
| evaluate(requestId) | Promise<Evaluation> | Run rules evaluation and return verdict for a given identification. |
sk_live_... key in client-side code or version control. Use environment variables or a secrets manager. Rotate keys immediately if compromised via Settings → API Keys.Python Server SDK
Python SDK for server-side verification and API access. Supports Python 3.8+ with both sync and async clients. Full type annotations included.
Installation
pip install prynt-sdk
Quick start
import os from prynt import PryntClient client = PryntClient( secret_key=os.environ["PRYNT_SECRET_KEY"] ) # Verify an identification event = client.events.get("req_1707832921_a7f2c9") print(event.visitor_id) # "pv_8kX2mNqR3jT7p" print(event.confidence) # 0.995 print(event.signals.bot) # BotSignal(detected=False) # Get visitor history visitor = client.visitors.get("pv_8kX2mNqR3jT7p") print(visitor.total_events) # 142 # Async usage from prynt import AsyncPryntClient async_client = AsyncPryntClient( secret_key=os.environ["PRYNT_SECRET_KEY"] ) event = await async_client.events.get("req_...")
Go Server SDK
Go SDK for server-side verification. Idiomatic Go with context support, structured errors, and zero external dependencies.
Installation
go get github.com/prynt-io/prynt-go
Quick start
package main import ( "context" "fmt" "os" "github.com/prynt-io/prynt-go" ) func main() { client := prynt.NewClient( os.Getenv("PRYNT_SECRET_KEY"), ) // Verify an identification event, err := client.Events.Get( context.Background(), "req_1707832921_a7f2c9", ) if err != nil { panic(err) } fmt.Println(event.VisitorID) // "pv_8kX2mNqR3jT7p" fmt.Println(event.Confidence) // 0.995 fmt.Println(event.Signals.Bot) // {Detected: false} }
Java Server SDK
Java SDK for server-side verification. Supports Java 11+ with both synchronous and reactive (Project Reactor) clients. Works with Spring Boot, Quarkus, and Micronaut.
Installation
<dependency> <groupId>com.prynt</groupId> <artifactId>prynt-java</artifactId> <version>2.4.0</version> </dependency>
implementation 'com.prynt:prynt-java:2.4.0'
Quick start
import com.prynt.sdk.PryntClient; import com.prynt.sdk.model.Event; public class VerifyService { private final PryntClient client; public VerifyService() { this.client = PryntClient.builder() .secretKey(System.getenv("PRYNT_SECRET_KEY")) .build(); } public Event verify(String requestId) { Event event = client.events().get(requestId); System.out.println(event.getVisitorId()); System.out.println(event.getConfidence()); return event; } }
Ruby Server SDK
Ruby SDK for server-side verification. Supports Ruby 3.0+ with a clean, idiomatic API. Works with Rails, Sinatra, and any Rack-based framework.
Installation
gem install prynt # Or add to your Gemfile gem 'prynt', '~> 1.2'
Quick start
require 'prynt' client = Prynt::Client.new( secret_key: ENV['PRYNT_SECRET_KEY'] ) # Verify an identification event = client.events.get('req_1707832921_a7f2c9') puts event.visitor_id # "pv_8kX2mNqR3jT7p" puts event.confidence # 0.995 puts event.signals.bot # #<BotSignal detected=false> # Get visitor history visitor = client.visitors.get('pv_8kX2mNqR3jT7p') puts visitor.total_events # 142
.NET Server SDK Beta
The .NET SDK for server-side verification. Supports .NET 6+ with full async/await support, dependency injection, and strongly-typed models. Currently in public beta.
Installation
dotnet add package Prynt.SDK --version 0.9.0-beta # Or via Package Manager Console Install-Package Prynt.SDK -Version 0.9.0-beta
Quick start
using Prynt.SDK; // Register in DI (Startup.cs / Program.cs) builder.Services.AddPrynt(options => { options.SecretKey = builder.Configuration["Prynt:SecretKey"]; }); // Inject and use in a controller public class VerifyController : ControllerBase { private readonly IPryntClient _prynt; public VerifyController(IPryntClient prynt) { _prynt = prynt; } [HttpPost("api/verify")] public async Task<IActionResult> Verify( [FromBody] VerifyRequest request) { var ev = await _prynt.Events .GetAsync(request.RequestId); if (ev.Signals.Bot.Detected) return Forbid(); return Ok(new { ev.VisitorId }); } }
AddPrynt() extension registers IPryntClient as a singleton with automatic HttpClient management via IHttpClientFactory. Works seamlessly with ASP.NET Core, Azure Functions, and Worker Services.