<?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;
}