Skip to main content

Server SDKs for v4 API coming soon

We are working on new major versions of all our SDKs. If you need to use this integration, please use the v3 API instead or generate your own from the Server API OpenAPI schema.

How to install

Add the package to your composer.json file as a dependency:
Bash
composer require fingerprint/fingerprint-pro-server-api-sdk
Initialize the client instance and use it to make API requests. You need to specify your secret API key and region (if it is not US/Global).
PHP
<?php

require_once(__DIR__ . '/vendor/autoload.php');
use Fingerprint\ServerAPI\Api\FingerprintApi;
use Fingerprint\ServerAPI\Configuration;
use GuzzleHttp\Client;

$config = Configuration::getDefaultConfiguration(
  "<SECRET_API_KEY>",
  // Configuration::REGION_EUROPE
);
$client = new FingerprintApi(
  new Client(),
  $config
);

// Get visit history of a specific visitor
try {
  list($model, $response) = $client->getVisits("<visitorId>");
  echo "Status: " . $response->getStatusCode();
  echo "<pre>" . $response->getBody()->getContents() . "</pre>";
} catch (Exception $e) {
  echo $e->getMessage(), PHP_EOL;
}

// Get a specific identification event
try {
  list($model, $response) = $client->getEvent("<requestId>");
  echo "Status: " . $response->getStatusCode();
  echo "<pre>" . $response->getBody()->getContents() . "</pre>";
} catch (Exception $e) {
  echo $e->getMessage(), PHP_EOL;
}

Documentation

You can find the full documentation in the official GitHub repository.