How to install
Add the package to yourcomposer.json file as a dependency:
Bash
PHP
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
The PHP Server SDK is an easy way to interact with our Server API from your PHP application. You can retrieve visitor history or individual identification events. View our PHP Server SDK quickstart for a step-by-step guide to get started.
composer.json file as a dependency:
composer require fingerprint/fingerprint-pro-server-api-sdk:^6.10
<?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("VISITOR_ID");
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("REQUEST_ID");
echo "Status: " . $response->getStatusCode();
echo "<pre>" . $response->getBody()->getContents() . "</pre>";
} catch (Exception $e) {
echo $e->getMessage(), PHP_EOL;
}
Was this page helpful?