> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fingerprint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PHP Server SDK

> 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](/docs/v3/php-server-quickstart) for a step-by-step guide to get started.

export const DeprecatedVersion = ({currentPath}) => <Warning>
    This version is deprecated. See the{" "}
    <a href="/reference/api-deprecation-policy">deprecation policy</a> and use
    the <a href={currentPath}>current version</a> instead.
  </Warning>;

<DeprecatedVersion currentPath="/reference/php-server-sdk" />

### How to install

Add the package to your `composer.json` file as a dependency:

```bash Bash theme={"theme":"github-dark-dimmed"}
composer require fingerprint/fingerprint-pro-server-api-sdk:^6.10
```

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 theme={"theme":"github-dark-dimmed"}
<?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;
}
```

### Documentation

You can find the full documentation in the official [GitHub repository](https://github.com/fingerprintjs/php-sdk/tree/api-v3).
