Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk
PHP SDK for Fingerprint Pro Server API
https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk
audio-fingerprinting browser browser-fingerprint browser-fingerprinting detection fingerprint fingerprinting fingerprintjs fingerprintjs-pro fraud fraud-detection identification php visitor-identification
Last synced: 2 days ago
JSON representation
PHP SDK for Fingerprint Pro Server API
- Host: GitHub
- URL: https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk
- Owner: fingerprintjs
- License: mit
- Created: 2022-09-20T07:52:26.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T11:09:13.000Z (20 days ago)
- Last Synced: 2024-10-29T13:07:54.865Z (20 days ago)
- Topics: audio-fingerprinting, browser, browser-fingerprint, browser-fingerprinting, detection, fingerprint, fingerprinting, fingerprintjs, fingerprintjs-pro, fraud, fraud-detection, identification, php, visitor-identification
- Language: PHP
- Homepage:
- Size: 6.33 MB
- Stars: 22
- Watchers: 9
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: contributing.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Fingerprint Pro Server API PHP SDK
**Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. It can be used for data exports, decision-making, and data analysis scenarios. Server API is intended for server-side usage, it's not intended to be used from the client side, whether it's a browser or a mobile device.**This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API version: 3
- Package version: 6.0.0-rc.0
- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen## Requirements
This library supports the following PHP implementations:
- PHP 8.1
- PHP 8.2
- PHP 8.3We currently don't support external PHP Runtimes like:
- Bref
- ReactPHP## Installation & Usage
### ComposerTo install the bindings via [Composer](https://getcomposer.org/), add the following to `composer.json`:
```
{
"require": {
"fingerprint/fingerprint-pro-server-api-sdk": "dev-main"
}
}
```Then run `composer install`.
Or you can just run this command on your terminal:
`composer require fingerprint/fingerprint-pro-server-api-sdk`
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```php
getEvent(FPJS_REQUEST_ID);
echo "" . $response->__toString() . "";
} catch (Exception $e) {
echo 'Exception when calling FingerprintApi->getEvent: ', $e->getMessage(), PHP_EOL;
}// Get a specific visitor's all visits
try {
// Fetch all visits with a given visitorId, with a page limit
list($model, $response) = $client->getVisits(FPJS_VISITOR_ID, null, null, LIMIT);
echo "" . $response->getBody()->getContents() . "";
} catch (Exception $e) {
echo 'Exception when calling FingerprintApi->getVisits: ', $e->getMessage(), PHP_EOL;
}// Get a specific visitor's all visits with a linkedId
try {
// Fetch all visits with a given visitorId, with a page limit, skipping the first visit
list($model, $response) = $client->getVisits(FPJS_VISITOR_ID, null, FPJS_LINKED_ID, LIMIT, PAGINATION_KEY);
echo "" . $response->getBody()->getContents() . "";
} catch (Exception $e) {
echo 'Exception when calling FingerprintApi->getVisits: ', $e->getMessage(), PHP_EOL;
}// Use all the parameters on getVisits
try {
// Fetch the visitor's all visits with a given requestId and linkedId with a page limit while skipping the first visit
list($model, $response) = $client->getVisits(FPJS_VISITOR_ID, FPJS_REQUEST_ID, FPJS_LINKED_ID, LIMIT, PAGINATION_KEY);
echo "" . $response->getBody()->getContents() . "";
} catch (Exception $e) {
echo 'Exception when calling FingerprintApi->getVisits: ', $e->getMessage(), PHP_EOL;
}// Update Event
try {
$body = new EventsUpdateRequest([
'linked_id' => 'new linked id',
'tag' => ['new_property' => 'new value'],
'suspect' => true,
]);
list($model, $response) = $client->updateEvent($body, FPJS_REQUEST_ID);
echo "" . $response->getBody()->getContents() . "";
} catch (Exception $e) {
echo 'Exception when calling FingerprintApi->updateEvent: ', $e->getMessage(), PHP_EOL;
}// Delete by visitor ID
try {
list($model, $response) = $client->deleteVisitorData(FPJS_VISITOR_ID);
echo "" . $response->getBody()->getContents() . "";
} catch (Exception $e) {
echo 'Exception when calling FingerprintApi->deleteVisitorData: ', $e->getMessage(), PHP_EOL;
}
```> ⚠️ Warning It's not possible to update events older than 10 days.
> ⚠️ If you are interested in using `deleteVisitorData` API, please [contact our support team](https://fingerprint.com/support/) to enable it for you. Otherwise, you will receive a 403.
## Sealed results
This SDK provides utility methods for decoding [sealed results](https://dev.fingerprint.com/docs/sealed-client-results).
```php
getMessage()));
exit(1);
}
```
To learn more, refer to example located in [sealed_results_example.php](sealed_results_example.php).## Documentation for API Endpoints
All URIs are relative to your region's base URL.
| Region | BasePath |
|-------------|------------------------|
| US / Global | https://api.fpjs.io |
| Europe | https://eu.api.fpjs.io |
| Asia | https://ap.api.fpjs.io |## Webhook Signing
This SDK provides utility method for verifying the HMAC signature of the incoming webhook request.
You can use below code to verify signature:```php