├── .changeset └── config.json ├── .env.example ├── .git_hooks ├── commit-msg ├── pre-commit └── pre-push ├── .github └── workflows │ ├── analyze-commits.yml │ ├── check-templates-consistency.yml │ ├── coverage-diff.yml │ ├── coverage-report.yml │ ├── e2e-tests.yml │ ├── functional.yml │ ├── release.yml │ └── test.yml ├── .gitignore ├── .php-cs-fixer.php ├── .schema-version ├── .swagger-codegen-ignore ├── .swagger-codegen └── VERSION ├── CHANGELOG.md ├── CODEOWNERS ├── LICENSE ├── README.md ├── bin └── swagger-codegen-cli.jar ├── changeset-publish.sh ├── changeset-version.sh ├── commitlint.config.js ├── composer.json ├── composer.lock ├── config.json ├── contributing.md ├── cov ├── .gitkeep ├── html │ └── .gitkeep ├── json │ └── .gitkeep ├── markdown │ └── .gitkeep └── xml │ └── .gitkeep ├── docker-compose.yml ├── docker └── php │ ├── Dockerfile │ └── xdebug.ini ├── docs ├── Api │ └── FingerprintApi.md ├── Model │ ├── Botd.md │ ├── BotdBot.md │ ├── BotdBotResult.md │ ├── BrowserDetails.md │ ├── ClonedApp.md │ ├── DeprecatedGeolocation.md │ ├── DeveloperTools.md │ ├── Emulator.md │ ├── Error.md │ ├── ErrorCode.md │ ├── ErrorPlainResponse.md │ ├── ErrorResponse.md │ ├── EventsGetResponse.md │ ├── EventsUpdateRequest.md │ ├── FactoryReset.md │ ├── Frida.md │ ├── Geolocation.md │ ├── GeolocationCity.md │ ├── GeolocationContinent.md │ ├── GeolocationCountry.md │ ├── HighActivity.md │ ├── IPBlocklist.md │ ├── IPBlocklistDetails.md │ ├── IPInfo.md │ ├── IPInfoASN.md │ ├── IPInfoDataCenter.md │ ├── IPInfoV4.md │ ├── IPInfoV6.md │ ├── Identification.md │ ├── IdentificationConfidence.md │ ├── IdentificationSeenAt.md │ ├── Incognito.md │ ├── Jailbroken.md │ ├── LocationSpoofing.md │ ├── MitMAttack.md │ ├── PrivacySettings.md │ ├── ProductBotd.md │ ├── ProductClonedApp.md │ ├── ProductDeveloperTools.md │ ├── ProductEmulator.md │ ├── ProductFactoryReset.md │ ├── ProductFrida.md │ ├── ProductHighActivity.md │ ├── ProductIPBlocklist.md │ ├── ProductIPInfo.md │ ├── ProductIdentification.md │ ├── ProductIncognito.md │ ├── ProductJailbroken.md │ ├── ProductLocationSpoofing.md │ ├── ProductMitMAttack.md │ ├── ProductPrivacySettings.md │ ├── ProductProxy.md │ ├── ProductRawDeviceAttributes.md │ ├── ProductRemoteControl.md │ ├── ProductRootApps.md │ ├── ProductSuspectScore.md │ ├── ProductTampering.md │ ├── ProductTor.md │ ├── ProductVPN.md │ ├── ProductVelocity.md │ ├── ProductVirtualMachine.md │ ├── Products.md │ ├── Proxy.md │ ├── ProxyConfidence.md │ ├── RelatedVisitor.md │ ├── RelatedVisitorsResponse.md │ ├── RemoteControl.md │ ├── RootApps.md │ ├── SearchEventsResponse.md │ ├── SearchEventsResponseEvents.md │ ├── SuspectScore.md │ ├── Tampering.md │ ├── Tor.md │ ├── VPN.md │ ├── VPNConfidence.md │ ├── VPNMethods.md │ ├── Velocity.md │ ├── VelocityData.md │ ├── VelocityIntervals.md │ ├── VirtualMachine.md │ ├── Visit.md │ ├── VisitorsGetResponse.md │ ├── Webhook.md │ ├── WebhookClonedApp.md │ ├── WebhookDeveloperTools.md │ ├── WebhookEmulator.md │ ├── WebhookFactoryReset.md │ ├── WebhookFrida.md │ ├── WebhookHighActivity.md │ ├── WebhookIPBlocklist.md │ ├── WebhookIPInfo.md │ ├── WebhookJailbroken.md │ ├── WebhookLocationSpoofing.md │ ├── WebhookMitMAttack.md │ ├── WebhookPrivacySettings.md │ ├── WebhookProxy.md │ ├── WebhookRemoteControl.md │ ├── WebhookRootApps.md │ ├── WebhookSuspectScore.md │ ├── WebhookTampering.md │ ├── WebhookTor.md │ ├── WebhookVPN.md │ ├── WebhookVelocity.md │ └── WebhookVirtualMachine.md ├── Sealed │ ├── DecryptionKey.md │ └── Sealed.md └── Webhook.md ├── generate_coverage_report.php ├── install_hooks.sh ├── package.json ├── phpunit.xml.dist ├── pnpm-lock.yaml ├── res └── fingerprint-server-api.yaml ├── run_checks.php ├── scripts ├── functional.sh ├── generate.sh ├── install.sh ├── sync.sh └── test.sh ├── sealed_results_example.php ├── src ├── Api │ └── FingerprintApi.php ├── ApiException.php ├── Configuration.php ├── Model │ ├── Botd.php │ ├── BotdBot.php │ ├── BotdBotResult.php │ ├── BrowserDetails.php │ ├── ClonedApp.php │ ├── DeprecatedGeolocation.php │ ├── DeveloperTools.php │ ├── Emulator.php │ ├── Error.php │ ├── ErrorCode.php │ ├── ErrorPlainResponse.php │ ├── ErrorResponse.php │ ├── EventsGetResponse.php │ ├── EventsUpdateRequest.php │ ├── FactoryReset.php │ ├── Frida.php │ ├── Geolocation.php │ ├── GeolocationCity.php │ ├── GeolocationContinent.php │ ├── GeolocationCountry.php │ ├── HighActivity.php │ ├── IPBlocklist.php │ ├── IPBlocklistDetails.php │ ├── IPInfo.php │ ├── IPInfoASN.php │ ├── IPInfoDataCenter.php │ ├── IPInfoV4.php │ ├── IPInfoV6.php │ ├── Identification.php │ ├── IdentificationConfidence.php │ ├── IdentificationSeenAt.php │ ├── Incognito.php │ ├── Jailbroken.php │ ├── LocationSpoofing.php │ ├── MitMAttack.php │ ├── ModelInterface.php │ ├── PrivacySettings.php │ ├── ProductBotd.php │ ├── ProductClonedApp.php │ ├── ProductDeveloperTools.php │ ├── ProductEmulator.php │ ├── ProductFactoryReset.php │ ├── ProductFrida.php │ ├── ProductHighActivity.php │ ├── ProductIPBlocklist.php │ ├── ProductIPInfo.php │ ├── ProductIdentification.php │ ├── ProductIncognito.php │ ├── ProductJailbroken.php │ ├── ProductLocationSpoofing.php │ ├── ProductMitMAttack.php │ ├── ProductPrivacySettings.php │ ├── ProductProxy.php │ ├── ProductRawDeviceAttributes.php │ ├── ProductRemoteControl.php │ ├── ProductRootApps.php │ ├── ProductSuspectScore.php │ ├── ProductTampering.php │ ├── ProductTor.php │ ├── ProductVPN.php │ ├── ProductVelocity.php │ ├── ProductVirtualMachine.php │ ├── Products.php │ ├── Proxy.php │ ├── ProxyConfidence.php │ ├── RelatedVisitor.php │ ├── RelatedVisitorsResponse.php │ ├── RemoteControl.php │ ├── RootApps.php │ ├── SearchEventsResponse.php │ ├── SearchEventsResponseEvents.php │ ├── SuspectScore.php │ ├── Tampering.php │ ├── Tor.php │ ├── VPN.php │ ├── VPNConfidence.php │ ├── VPNMethods.php │ ├── Velocity.php │ ├── VelocityData.php │ ├── VelocityIntervals.php │ ├── VirtualMachine.php │ ├── Visit.php │ ├── VisitorsGetResponse.php │ ├── Webhook.php │ ├── WebhookClonedApp.php │ ├── WebhookDeveloperTools.php │ ├── WebhookEmulator.php │ ├── WebhookFactoryReset.php │ ├── WebhookFrida.php │ ├── WebhookHighActivity.php │ ├── WebhookIPBlocklist.php │ ├── WebhookIPInfo.php │ ├── WebhookJailbroken.php │ ├── WebhookLocationSpoofing.php │ ├── WebhookMitMAttack.php │ ├── WebhookPrivacySettings.php │ ├── WebhookProxy.php │ ├── WebhookRemoteControl.php │ ├── WebhookRootApps.php │ ├── WebhookSuspectScore.php │ ├── WebhookTampering.php │ ├── WebhookTor.php │ ├── WebhookVPN.php │ ├── WebhookVelocity.php │ └── WebhookVirtualMachine.php ├── ObjectSerializer.php ├── Sealed │ ├── DecompressionException.php │ ├── DecryptionAlgorithm.php │ ├── DecryptionKey.php │ ├── InvalidSealedDataException.php │ ├── InvalidSealedDataHeaderException.php │ ├── Sealed.php │ ├── UnsealAggregateException.php │ └── UnsealException.php ├── SerializationException.php └── Webhook │ └── WebhookVerifier.php ├── template ├── ApiException.mustache ├── Configuration.mustache ├── README.mustache ├── api.mustache ├── api_doc.mustache ├── composer.mustache ├── model.mustache ├── model_doc.mustache ├── model_enum.mustache └── model_generic.mustache └── test ├── FingerprintApiTest.php ├── ObjectSerializerTest.php ├── Sealed └── SealedTest.php ├── WebhookVerifierTest.php └── mocks ├── errors ├── 400_bot_type_invalid.json ├── 400_end_time_invalid.json ├── 400_ip_address_invalid.json ├── 400_limit_invalid.json ├── 400_linked_id_invalid.json ├── 400_pagination_key_invalid.json ├── 400_request_body_invalid.json ├── 400_reverse_invalid.json ├── 400_start_time_invalid.json ├── 400_visitor_id_invalid.json ├── 400_visitor_id_required.json ├── 403_feature_not_enabled.json ├── 403_subscription_not_active.json ├── 403_token_not_found.json ├── 403_token_required.json ├── 403_wrong_region.json ├── 404_request_not_found.json ├── 404_visitor_not_found.json ├── 409_state_not_ready.json └── 429_too_many_requests.json ├── get_event_200.json ├── get_event_200_all_errors.json ├── get_event_200_botd_failed_error.json ├── get_event_200_extra_fields.json ├── get_event_200_identification_failed_error.json ├── get_event_200_too_many_requests_error.json ├── get_event_200_with_broken_format.json ├── get_event_200_with_unknown_field.json ├── get_event_search_200.json ├── get_visitors_200_limit_1.json ├── get_visitors_200_limit_500.json ├── get_visitors_400_bad_request.json ├── get_visitors_403_forbidden.json ├── get_visitors_429_too_many_requests.json ├── related-visitors ├── get_related_visitors_200.json └── get_related_visitors_200_empty.json ├── update_event_multiple_fields_request.json ├── update_event_one_field_request.json └── webhook.json /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@3.0.2/schema.json", 3 | "changelog": [ 4 | "@fingerprintjs/changesets-changelog-format", 5 | { 6 | "repo": "fingerprintjs/fingerprint-pro-server-api-php-sdk" 7 | } 8 | ], 9 | "commit": false, 10 | "fixed": [], 11 | "linked": [], 12 | "access": "restricted", 13 | "baseBranch": "main", 14 | "updateInternalDependencies": "patch", 15 | "ignore": [], 16 | "privatePackages": { 17 | "version": true, 18 | "tag": true 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | FP_PRIVATE_API_KEY= 2 | FP_VISITOR_ID_TO_DELETE= 3 | FP_REQUEST_ID_TO_UPDATE= 4 | # "eu" or "ap", the default is "us" 5 | FP_REGION= 6 | -------------------------------------------------------------------------------- /.git_hooks/commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | npx commitlint --edit $1 4 | -------------------------------------------------------------------------------- /.git_hooks/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | docker run --rm -v $(pwd):/code ghcr.io/php-cs-fixer/php-cs-fixer:3.64-php8.3 fix --config=/code/.php-cs-fixer.php -------------------------------------------------------------------------------- /.git_hooks/pre-push: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | containsref() { if [[ $2 =~ $1 ]]; then echo 1; else echo 0; fi } 5 | 6 | push_command=$(ps -ocommand= -p $PPID | cut -d' ' -f 4) 7 | protected_branch='main' 8 | current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') 9 | is_push_to_main_origin=$(containsref 'git@github.com:/?fingerprintjs/' "$push_command") 10 | 11 | # Block pushes only to protected branch in main repository 12 | if [ $is_push_to_main_origin = 1 ] && [ "$protected_branch" = "$current_branch" ]; then 13 | echo "You are on the $protected_branch branch, push blocked." 14 | exit 1 # push will not execute 15 | fi 16 | -------------------------------------------------------------------------------- /.github/workflows/analyze-commits.yml: -------------------------------------------------------------------------------- 1 | name: Analyze Commit Messages 2 | on: [pull_request] 3 | 4 | permissions: 5 | pull-requests: write 6 | contents: write 7 | jobs: 8 | analyze-commits: 9 | name: Analyze commits 10 | uses: fingerprintjs/dx-team-toolkit/.github/workflows/analyze-commits.yml@v1 11 | with: 12 | previewNotes: false 13 | 14 | preview-changeset: 15 | name: Preview changeset 16 | uses: fingerprintjs/dx-team-toolkit/.github/workflows/preview-changeset-release.yml@v1 17 | with: 18 | pr-title: ${{ github.event.pull_request.title }} 19 | -------------------------------------------------------------------------------- /.github/workflows/check-templates-consistency.yml: -------------------------------------------------------------------------------- 1 | name: Check template consistency 2 | 3 | on: 4 | pull_request: 5 | 6 | permissions: 7 | pull-requests: write 8 | 9 | jobs: 10 | check-template-consistency: 11 | uses: fingerprintjs/dx-team-toolkit/.github/workflows/check-template-consistency.yml@v1 12 | with: 13 | generate-command: 'bash ./scripts/generate.sh' -------------------------------------------------------------------------------- /.github/workflows/coverage-diff.yml: -------------------------------------------------------------------------------- 1 | name: 'coverage-diff' 2 | on: 3 | pull_request: 4 | 5 | jobs: 6 | coverage-diff: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v4 10 | with: 11 | clean: false 12 | - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 13 | with: 14 | php-version: 8.2 15 | coverage: none 16 | tools: composer:v2 17 | extensions: xdebug 18 | - name: Install Dependencies 19 | run: composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist 20 | - uses: KengoTODA/actions-setup-docker-compose@4677f0d86d41e623c9c6e11e1d910976da297bc0 21 | with: 22 | version: '2.14.2' 23 | - name: "Create Empty env File for Docker" 24 | run: touch .env 25 | - name: Clear previous coverage data 26 | run: rm -f cov/xml/clover-pr.xml cov/xml/clover-base.xml cov/xml/clover.xml 27 | - name: PHPUnit for PR 28 | run: docker-compose run phpunit 29 | - name: Create coverage report for PR 30 | id: pr_coverage 31 | run: | 32 | php ./generate_coverage_report.php 33 | COVERAGE_PR=$(jq -r '.total.statements.pct' cov/json/index.json) 34 | echo "COVERAGE_PR=$COVERAGE_PR" >> $GITHUB_ENV 35 | - name: Upload coverage report markdown 36 | if: always() 37 | uses: actions/upload-artifact@v4 38 | with: 39 | name: coverage-report-md 40 | path: cov/markdown/coverage_report.md 41 | 42 | - uses: actions/checkout@v4 43 | with: 44 | ref: ${{ github.event.pull_request.base.ref }} 45 | clean: false 46 | 47 | - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 48 | with: 49 | php-version: 8.2 50 | coverage: none 51 | tools: composer:v2 52 | extensions: xdebug 53 | - name: Install Dependencies 54 | run: composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist 55 | - uses: KengoTODA/actions-setup-docker-compose@4677f0d86d41e623c9c6e11e1d910976da297bc0 56 | with: 57 | version: '2.14.2' 58 | - name: "Create Empty env File for Docker" 59 | run: touch .env 60 | - name: PHPUnit for Base 61 | run: docker-compose run phpunit 62 | - name: Create coverage report for Base 63 | id: base_coverage 64 | run: | 65 | COVERAGE_BASE=0 66 | 67 | if [ -f "./generate_coverage_report.php" ]; then 68 | php ./generate_coverage_report.php 69 | fi 70 | 71 | if [ -f "cov/json/index.json" ]; then 72 | COVERAGE_BASE=$(jq -r '.total.statements.pct' cov/json/index.json) 73 | fi 74 | 75 | echo "COVERAGE_BASE=$COVERAGE_BASE" >> $GITHUB_ENV 76 | 77 | - name: Compare coverage 78 | id: compare_coverage 79 | run: | 80 | COVERAGE_DIFF=$(echo "$COVERAGE_PR - $COVERAGE_BASE" | awk '{printf "%.2f", $0}') 81 | echo "Coverage PR: $COVERAGE_PR%" 82 | echo "Coverage Base: $COVERAGE_BASE%" 83 | echo "Coverage Diff: $COVERAGE_DIFF%" 84 | 85 | if (( $(echo "$COVERAGE_DIFF > 0" | awk '{print ($0 > 0)}') )); then 86 | COVERAGE_MESSAGE=":green_circle: Coverage increased by $COVERAGE_DIFF%" 87 | elif (( $(echo "$COVERAGE_DIFF < 0" | awk '{print ($0 < 0)}') )); then 88 | COVERAGE_MESSAGE=":red_circle: Coverage decreased by ${COVERAGE_DIFF#-}%" 89 | else 90 | COVERAGE_MESSAGE=":yellow_circle: Coverage remained the same." 91 | fi 92 | 93 | echo "COVERAGE_MESSAGE=$COVERAGE_MESSAGE" >> $GITHUB_ENV 94 | 95 | - name: Download coverage report markdown 96 | uses: actions/download-artifact@v4 97 | with: 98 | name: coverage-report-md 99 | path: cov/markdown/ 100 | 101 | - name: Combine Coverage Message and Report 102 | run: | 103 | echo "${COVERAGE_MESSAGE}" > coverage_message.txt 104 | cat cov/markdown/coverage_report.md >> coverage_message.txt 105 | combined_message=$(cat coverage_message.txt) 106 | echo "combined_message<> $GITHUB_ENV 107 | echo "$combined_message" >> $GITHUB_ENV 108 | echo "EOF" >> $GITHUB_ENV 109 | 110 | - name: Add comment with coverage report 111 | uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 112 | with: 113 | message: "${{ env.combined_message }}" 114 | - name: Add coverage report to the job summary 115 | run: | 116 | { 117 | echo "${{ env.combined_message }}" 118 | } >> $GITHUB_STEP_SUMMARY -------------------------------------------------------------------------------- /.github/workflows/coverage-report.yml: -------------------------------------------------------------------------------- 1 | name: 'coverage-report' 2 | on: 3 | push: 4 | branches: 5 | - main 6 | 7 | permissions: 8 | contents: write 9 | jobs: 10 | coverage-report: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v4 14 | - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 15 | with: 16 | php-version: 8.2 17 | coverage: none 18 | tools: composer:v2 19 | extensions: xdebug 20 | - name: Install Dependencies 21 | run: composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist 22 | - uses: KengoTODA/actions-setup-docker-compose@4677f0d86d41e623c9c6e11e1d910976da297bc0 23 | with: 24 | version: '2.14.2' 25 | - name: "Create Empty env File for Docker" 26 | run: touch .env 27 | - name: PHPUnit 28 | run: docker-compose run --user "$(id -u):$(id -g)" phpunit 29 | - name: "Parse Coverage" 30 | run: "php ./generate_coverage_report.php" 31 | - name: Create Coverage Badges 32 | uses: jaywcjlove/coverage-badges-cli@df58615045079f1c827de7867044bbab3ec22b43 33 | with: 34 | source: cov/json/index.json 35 | output: cov/html/coverage.svg 36 | jsonPath: total.statements.pct 37 | - name: Deploy 🚀 38 | uses: JamesIves/github-pages-deploy-action@920cbb300dcd3f0568dbc42700c61e2fd9e6139c 39 | with: 40 | branch: gh-pages 41 | folder: cov/html 42 | clean-exclude: | 43 | .nojekyll -------------------------------------------------------------------------------- /.github/workflows/e2e-tests.yml: -------------------------------------------------------------------------------- 1 | name: E2E Tests 2 | on: 3 | release: 4 | types: 5 | - published 6 | 7 | jobs: 8 | read-version: 9 | name: 'Read package version' 10 | runs-on: ubuntu-latest 11 | outputs: 12 | version: ${{ steps.version.outputs.version }} 13 | steps: 14 | - uses: actions/checkout@v4 15 | - name: Read version from config.json 16 | id: version 17 | run: echo version=$(node -p "require('./package.json').version") >> $GITHUB_OUTPUT 18 | e2e-tests: 19 | name: 'Run E2E tests' 20 | needs: read-version 21 | uses: fingerprintjs/dx-team-toolkit/.github/workflows/run-server-sdk-e2e-tests.yml@v1 22 | with: 23 | sdk: php 24 | sdkVersion: ${{ contains(needs.read-version.outputs.version, 'develop') && 'dev-main' || needs.read-version.outputs.version }} 25 | appId: ${{ vars.RUNNER_APP_ID }} 26 | commitSha: ${{ github.event.pull_request.head.sha || github.sha }} 27 | secrets: 28 | APP_PRIVATE_KEY: ${{ secrets.RUNNER_APP_PRIVATE_KEY }} 29 | SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} 30 | -------------------------------------------------------------------------------- /.github/workflows/functional.yml: -------------------------------------------------------------------------------- 1 | name: Functional tests 2 | 3 | on: 4 | push: 5 | branches-ignore: 6 | - main 7 | workflow_dispatch: 8 | schedule: 9 | - cron: '0 5 * * *' 10 | 11 | jobs: 12 | functional_tests: 13 | name: "Functional Tests PHP ${{ matrix.php_version }}" 14 | runs-on: "ubuntu-latest" 15 | 16 | strategy: 17 | max-parallel: 1 18 | matrix: 19 | php_version: [ "8.1", "8.2", "8.3", "8.4" ] 20 | steps: 21 | - uses: actions/checkout@v4 22 | with: 23 | ref: ${{ github.event.pull_request.head.sha }} 24 | - name: Setup PHP 25 | uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 26 | with: 27 | php-version: "${{ matrix.php_version }}" 28 | coverage: none 29 | tools: composer:v2 30 | - name: Install Dependencies 31 | run: composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist 32 | - name: "Try to get data using SDK" 33 | run: "php ./run_checks.php" 34 | env: 35 | FP_PRIVATE_API_KEY: "${{ secrets.FP_PRIVATE_API_KEY }}" 36 | FP_API_HOST: "${{ secrets.FP_API_HOST }}" 37 | 38 | report-status: 39 | needs: functional_tests 40 | if: always() 41 | uses: fingerprintjs/dx-team-toolkit/.github/workflows/report-workflow-status.yml@v1 42 | with: 43 | notification_title: 'PHP SDK Tests has {status_message}' 44 | job_status: ${{ needs.functional_tests.result }} 45 | secrets: 46 | SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} 47 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: 'Release' 2 | on: 3 | push: 4 | branches: 5 | - main 6 | 7 | jobs: 8 | release: 9 | name: 'Release project' 10 | uses: fingerprintjs/dx-team-toolkit/.github/workflows/release-sdk-changesets.yml@v1 11 | with: 12 | appId: ${{ vars.APP_ID }} 13 | runnerAppId: ${{ vars.RUNNER_APP_ID }} 14 | version-command: bash ./changeset-version.sh 15 | publish-command: bash ./changeset-publish.sh 16 | language: php 17 | language-version: '8.3' 18 | prepare-command: | 19 | composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist 20 | secrets: 21 | APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} 22 | RUNNER_APP_PRIVATE_KEY: ${{ secrets.RUNNER_APP_PRIVATE_KEY }} 23 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: test 2 | 3 | on: 4 | push: 5 | branches-ignore: 6 | - main 7 | 8 | jobs: 9 | tests: 10 | name: "PHP ${{ matrix.php_version }}" 11 | runs-on: "ubuntu-latest" 12 | 13 | strategy: 14 | matrix: 15 | php_version: [ "8.1", "8.2", "8.3", "8.4" ] 16 | 17 | steps: 18 | - uses: actions/checkout@v4 19 | - name: Setup PHP 20 | uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 21 | with: 22 | php-version: "${{ matrix.php_version }}" 23 | coverage: none 24 | tools: composer:v2 25 | - name: Install Dependencies 26 | run: composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist 27 | - uses: php-actions/phpunit@aed47a6852905dbd05b7c1a47c526b38fcc4bc17 28 | with: 29 | php_version: "${{ matrix.php_version }}" 30 | bootstrap: vendor/autoload.php 31 | configuration: phpunit.xml.dist 32 | args: --coverage-text 33 | version: "8.5.33" 34 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | /vendor/ 3 | /.cache 4 | .phpunit.result.cache 5 | .DS_Store 6 | .vscode 7 | .env 8 | release/yarn-error.log 9 | release/node_modules 10 | .php-cs-fixer.cache 11 | cov/**/*.* 12 | !cov/**/.gitkeep 13 | **/node_modules -------------------------------------------------------------------------------- /.php-cs-fixer.php: -------------------------------------------------------------------------------- 1 | setRules([ 5 | '@PSR12' => true, 6 | '@PhpCsFixer' => true, 7 | 'array_indentation' => true, 8 | 'trailing_comma_in_multiline' => ['elements' => ['arrays']], 9 | 'no_whitespace_before_comma_in_array' => true, 10 | 'whitespace_after_comma_in_array' => true, 11 | 'array_syntax' => ['syntax' => 'short'], 12 | 'binary_operator_spaces' => [ 13 | 'default' => 'single_space', 14 | 'operators' => ['=>' => null], 15 | ], 16 | 'multiline_whitespace_before_semicolons' => false, 17 | 'phpdoc_trim' => false, 18 | 'phpdoc_no_empty_return' => false, 19 | 'phpdoc_types_order' => [ 20 | 'null_adjustment' => 'always_last', 21 | 'sort_algorithm' => 'none', 22 | ], 23 | ]) 24 | ->setFinder( 25 | PhpCsFixer\Finder::create() 26 | ->in(__DIR__ . "/src") 27 | ); -------------------------------------------------------------------------------- /.schema-version: -------------------------------------------------------------------------------- 1 | v2.7.0 -------------------------------------------------------------------------------- /.swagger-codegen-ignore: -------------------------------------------------------------------------------- 1 | .gitignore 2 | src/phpunit.xml.dist 3 | src/.travis.yml 4 | src/.php_cs 5 | src/git_push.sh 6 | src/test/** 7 | src/HeaderSelector.php 8 | src/ObjectSerializer.php 9 | 10 | # replaced by array and mixed types 11 | src/docs/Model/RawDeviceAttribute.md 12 | src/docs/Model/RawDeviceAttributeError.md 13 | src/docs/Model/RawDeviceAttributes.md 14 | src/docs/Model/Tag.md 15 | src/docs/Model/WebhookRawDeviceAttributes.md 16 | src/docs/Model/GeolocationSubdivisions.md 17 | src/docs/Model/GeolocationSubdivision.md 18 | 19 | src/Model/RawDeviceAttribute.php 20 | src/Model/RawDeviceAttributeError.php 21 | src/Model/RawDeviceAttributes.php 22 | src/Model/Tag.php 23 | src/Model/WebhookRawDeviceAttributes.php 24 | src/Model/GeolocationSubdivisions.php 25 | src/Model/GeolocationSubdivision.php 26 | -------------------------------------------------------------------------------- /.swagger-codegen/VERSION: -------------------------------------------------------------------------------- 1 | 3.0.34 -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @orkuncakilkaya @TheUnderScorer @ilfa 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 FingerprintJS 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /bin/swagger-codegen-cli.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/3757ac3a917c5728b8b8f47a58cdb597ff665bee/bin/swagger-codegen-cli.jar -------------------------------------------------------------------------------- /changeset-publish.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | bash ./scripts/generate.sh && pnpm exec changeset publish 3 | -------------------------------------------------------------------------------- /changeset-version.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | pnpm exec changeset version && bash ./scripts/generate.sh 3 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { extends: ['@fingerprintjs/commit-lint-dx-team'] }; 2 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fingerprint/fingerprint-pro-server-api-sdk", 3 | "version": "6.6.0", 4 | "description": "Fingerprint Server API provides a way for validating visitors’ data issued by Fingerprint Pro.", 5 | "keywords": [ 6 | "swagger", 7 | "php", 8 | "sdk", 9 | "api", 10 | "browser", 11 | "detection", 12 | "fingerprint", 13 | "identification", 14 | "fingerprinting", 15 | "browser-fingerprinting", 16 | "browser-fingerprint", 17 | "fraud-detection", 18 | "fraud", 19 | "audio-fingerprinting", 20 | "fingerprintjs", 21 | "visitor-identification", 22 | "fingerprintjs-pro" 23 | ], 24 | "homepage": "https://www.fingerprint.com", 25 | "license": "MIT", 26 | "authors": [ 27 | { 28 | "name": "fingerprint", 29 | "homepage": "https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk" 30 | } 31 | ], 32 | "require": { 33 | "php": ">=8.1", 34 | "ext-curl": "*", 35 | "ext-json": "*", 36 | "ext-mbstring": "*", 37 | "guzzlehttp/guzzle": "~7.2", 38 | "ext-zlib": "*", 39 | "ext-openssl": "*" 40 | }, 41 | "require-dev": { 42 | "phpunit/phpunit": "^11.5", 43 | "vlucas/phpdotenv": "^5.6" 44 | }, 45 | "autoload": { 46 | "psr-4": { "Fingerprint\\ServerAPI\\" : "./src" } 47 | }, 48 | "autoload-dev": { 49 | "psr-4": { "Fingerprint\\ServerAPI\\" : "test/" } 50 | } 51 | } -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "srcBasePath": ".", 3 | "packagePath": "src", 4 | "invokerPackage": "Fingerprint\\ServerAPI", 5 | "composerVendorName": "fingerprint", 6 | "composerProjectName": "fingerprint-pro-server-api-sdk", 7 | "packageUrl": "https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk", 8 | "gitUserId": "fingerprintjs", 9 | "gitRepoId": "fingerprint-pro-server-api-php-sdk", 10 | "description": "Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro.", 11 | "artifactVersion": "6.6.0" 12 | } 13 | -------------------------------------------------------------------------------- /contributing.md: -------------------------------------------------------------------------------- 1 | # Contributing to Fingerprint Pro Server API SDK 2 | 3 | ## Structure 4 | 5 | Most files in the project are autogenerated by [swagger-codegen](https://swagger.io/tools/swagger-codegen/) for php. 6 | 7 | - [template](./template) - folder contains redefined templates of `swagger-codegen`. Original templates you can find in [swagger-codegen repo](https://github.com/swagger-api/swagger-codegen/tree/751e59df060b1c3ecf54921e104f2086dfa9f820/modules/swagger-codegen/src/main/resources/php). 8 | - [docs](./docs) - generated documentation for models and [API Client](docs/Api/FingerprintApi.md). 9 | - [src](./src) - API Client code and generated models. 10 | 11 | ## Code generation 12 | 13 | You need `swagger-codegen` to run code generation. There are many ways described in the [readme](https://github.com/swagger-api/swagger-codegen). 14 | In the project we use local jar file `bin/swagger-codegen-cli.jar`. 15 | 16 | You can just run `sh ./scripts/generate.sh` script and it will do all the work. 17 | 18 | To download fresh OpenAPI schema run `sh ./scripts/sync.sh` 19 | 20 | ## Creating Coverage Report (Markdown and HTML) 21 | 22 | To generate a code coverage report, follow these steps: 23 | 24 | 1. Run PHPUnit to generate a coverage report: 25 | ```shell 26 | docker-compose run phpunit 27 | ``` 28 | 29 | - The Clover XML report will be saved in `cov/xml/clover.xml`. 30 | - The HTML report will be saved in the `cov/html` directory. 31 | 32 | 2. To convert the Clover XML report into a markdown report, run the generate_coverage_report.php script: 33 | ```shell 34 | docker-compose run php php generate_coverage_report.php 35 | ``` 36 | 37 | The markdown report will be saved in the `cov/markdown/coverage_report.md` file. You can open this file to review the coverage details. 38 | 39 | ### Testing the local source code of the SDK 40 | 41 | Use the `run_checks.php` file to make API requests using the local version of the SDK. 42 | 43 | 1. Make sure you have `php` installed. 44 | 2. Make sure you have `composer` installed. 45 | 3. Run `composer install` to install dependencies. 46 | 4. Create an `.env` file in the root folder according to [.env.example](.env.example) with your API key and test variables. 47 | 5. Finally, run `php run_checks.php`. 48 | 49 | ### Testing the local source code of the SDK (Docker) 50 | 51 | As an alternative to running the SDK tests locally, you can use Docker: 52 | 53 | 1. Ensure that Docker is installed and running on your machine. 54 | 2. Create an `.env` file in the root folder according to [.env.example](.env.example) with your API key and test variables. 55 | 3. Run the following command to install dependencies using Docker: 56 | ```shell 57 | docker-compose run composer install 58 | ``` 59 | 4. Run the following command to execute the SDK tests using Docker: 60 | ```shell 61 | docker-compose run php php run_checks.php 62 | ``` 63 | 64 | ### Configuration 65 | 66 | Project configuration is described in the `config.json` file. To read about available parameters run the command below: 67 | 68 | ```shell 69 | java -jar ./bin/swagger-codegen-cli.jar config-help -l php 70 | ``` 71 | 72 | ### How to publish 73 | 74 | We use [changesets](https://github.com/changesets/changesets) for handling release notes. If there are relevant changes, please add them to changeset via `pnpm exec changeset`. You need to run `pnpm install` before doing so. 75 | -------------------------------------------------------------------------------- /cov/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/3757ac3a917c5728b8b8f47a58cdb597ff665bee/cov/.gitkeep -------------------------------------------------------------------------------- /cov/html/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/3757ac3a917c5728b8b8f47a58cdb597ff665bee/cov/html/.gitkeep -------------------------------------------------------------------------------- /cov/json/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/3757ac3a917c5728b8b8f47a58cdb597ff665bee/cov/json/.gitkeep -------------------------------------------------------------------------------- /cov/markdown/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/3757ac3a917c5728b8b8f47a58cdb597ff665bee/cov/markdown/.gitkeep -------------------------------------------------------------------------------- /cov/xml/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/3757ac3a917c5728b8b8f47a58cdb597ff665bee/cov/xml/.gitkeep -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | composer: 4 | image: composer:2.7 5 | environment: 6 | - COMPOSER_CACHE_DIR=/app/.cache/composer 7 | volumes: 8 | - ./:/app 9 | php: 10 | image: php:8.4-cli 11 | volumes: 12 | - ./:/app 13 | working_dir: /app 14 | env_file: 15 | - .env 16 | phpunit: 17 | build: './docker/php' 18 | volumes: 19 | - ./:/app 20 | working_dir: /app 21 | entrypoint: vendor/bin/phpunit 22 | env_file: 23 | - .env 24 | lint: 25 | image: ghcr.io/php-cs-fixer/php-cs-fixer:3.64-php8.3 26 | volumes: 27 | - .:/code 28 | - ./.php-cs-fixer.php:/code/.php-cs-fixer.php 29 | command: fix --config=/code/.php-cs-fixer.php /code/src -------------------------------------------------------------------------------- /docker/php/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.4-cli 2 | 3 | # Install dependencies and Xdebug 4 | RUN apt-get update && apt-get install -y \ 5 | libicu-dev \ 6 | && docker-php-ext-install intl \ 7 | && pecl install xdebug \ 8 | && docker-php-ext-enable xdebug 9 | 10 | # Configure Xdebug 11 | COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini -------------------------------------------------------------------------------- /docker/php/xdebug.ini: -------------------------------------------------------------------------------- 1 | zend_extension=xdebug.so 2 | xdebug.mode=coverage 3 | xdebug.start_with_request=yes 4 | xdebug.discover_client_host=true 5 | xdebug.client_host=host.docker.internal 6 | xdebug.client_port=9003 -------------------------------------------------------------------------------- /docs/Model/Botd.md: -------------------------------------------------------------------------------- 1 | # Botd 2 | Contains all the information from Bot Detection product 3 | 4 | 5 | ## Properties 6 | Name | Type | Description | Notes 7 | ------------ | ------------- | ------------- | ------------- 8 | **bot** | [**\Fingerprint\ServerAPI\Model\BotdBot**](BotdBot.md) | | 9 | **meta** | array | | [optional] 10 | **linked_id** | **string** | A customer-provided id that was sent with the request. | [optional] 11 | **url** | **string** | Page URL from which the request was sent. | 12 | **ip** | **string** | IP address of the requesting browser or bot. | 13 | **time** | [**\DateTime**](\DateTime.md) | Time in UTC when the request from the JS agent was made. We recommend to treat requests that are older than 2 minutes as malicious. Otherwise, request replay attacks are possible. | 14 | **user_agent** | **string** | | 15 | **request_id** | **string** | Unique identifier of the user's request. | 16 | 17 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 18 | 19 | -------------------------------------------------------------------------------- /docs/Model/BotdBot.md: -------------------------------------------------------------------------------- 1 | # BotdBot 2 | Stores bot detection result 3 | 4 | 5 | ## Properties 6 | Name | Type | Description | Notes 7 | ------------ | ------------- | ------------- | ------------- 8 | **result** | [**\Fingerprint\ServerAPI\Model\BotdBotResult**](BotdBotResult.md) | | 9 | **type** | **string** | | [optional] 10 | 11 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 12 | 13 | -------------------------------------------------------------------------------- /docs/Model/BotdBotResult.md: -------------------------------------------------------------------------------- 1 | # BotdBotResult 2 | Bot detection result: 3 | * `notDetected` - the visitor is not a bot 4 | * `good` - good bot detected, such as Google bot, Baidu Spider, AlexaBot and so on 5 | * `bad` - bad bot detected, such as Selenium, Puppeteer, Playwright, headless browsers, and so on 6 | 7 | 8 | -------------------------------------------------------------------------------- /docs/Model/BrowserDetails.md: -------------------------------------------------------------------------------- 1 | # BrowserDetails 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **browser_name** | **string** | | 7 | **browser_major_version** | **string** | | 8 | **browser_full_version** | **string** | | 9 | **os** | **string** | | 10 | **os_version** | **string** | | 11 | **device** | **string** | | 12 | **user_agent** | **string** | | 13 | 14 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 15 | 16 | -------------------------------------------------------------------------------- /docs/Model/ClonedApp.md: -------------------------------------------------------------------------------- 1 | # ClonedApp 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | Android specific cloned application detection. There are 2 values: * `true` - Presence of app cloners work detected (e.g. fully cloned application found or launch of it inside of a not main working profile detected). * `false` - No signs of cloned application detected or the client is not Android. | 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/DeprecatedGeolocation.md: -------------------------------------------------------------------------------- 1 | # DeprecatedGeolocation 2 | This field is **deprecated** and will not return a result for **applications created after January 23rd, 2024**. Please use the [IP Geolocation Smart signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation) for geolocation information. 3 | 4 | 5 | ## Properties 6 | Name | Type | Description | Notes 7 | ------------ | ------------- | ------------- | ------------- 8 | **accuracy_radius** | **int** | The IP address is likely to be within this radius (in km) of the specified location. | [optional] 9 | **latitude** | **double** | | [optional] 10 | **longitude** | **double** | | [optional] 11 | **postal_code** | **string** | | [optional] 12 | **timezone** | **string** | | [optional] 13 | **city** | [**\Fingerprint\ServerAPI\Model\GeolocationCity**](GeolocationCity.md) | | [optional] 14 | **country** | [**\Fingerprint\ServerAPI\Model\GeolocationCountry**](GeolocationCountry.md) | | [optional] 15 | **continent** | [**\Fingerprint\ServerAPI\Model\GeolocationContinent**](GeolocationContinent.md) | | [optional] 16 | **subdivisions** | array | | [optional] 17 | 18 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 19 | 20 | -------------------------------------------------------------------------------- /docs/Model/DeveloperTools.md: -------------------------------------------------------------------------------- 1 | # DeveloperTools 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | `true` if the browser is Chrome with DevTools open or Firefox with Developer Tools open, `false` otherwise. | 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/Emulator.md: -------------------------------------------------------------------------------- 1 | # Emulator 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | Android specific emulator detection. There are 2 values: * `true` - Emulated environment detected (e.g. launch inside of AVD). * `false` - No signs of emulated environment detected or the client is not Android. | 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/Error.md: -------------------------------------------------------------------------------- 1 | # Error 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **code** | [**\Fingerprint\ServerAPI\Model\ErrorCode**](ErrorCode.md) | | 7 | **message** | **string** | | 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ErrorCode.md: -------------------------------------------------------------------------------- 1 | # ErrorCode 2 | Error code: 3 | * `RequestCannotBeParsed` - the query parameters or JSON payload contains some errors 4 | that prevented us from parsing it (wrong type/surpassed limits). 5 | * `TokenRequired` - `Auth-API-Key` header is missing or empty. 6 | * `TokenNotFound` - no Fingerprint application found for specified secret key. 7 | * `SubscriptionNotActive` - Fingerprint application is not active. 8 | * `WrongRegion` - server and application region differ. 9 | * `FeatureNotEnabled` - this feature (for example, Delete API) is not enabled for your application. 10 | * `RequestNotFound` - the specified request ID was not found. It never existed, expired, or it has been deleted. 11 | * `VisitorNotFound` - The specified visitor ID was not found. It never existed or it may have already been deleted. 12 | * `TooManyRequests` - the limit on secret API key requests per second has been exceeded. 13 | * `429 Too Many Requests` - the limit on secret API key requests per second has been exceeded. 14 | * `StateNotReady` - The event specified with request id is 15 | not ready for updates yet. Try again. 16 | This error happens in rare cases when update API is called immediately 17 | after receiving the request id on the client. In case you need to send 18 | information right away, we recommend using the JS agent API instead. 19 | * `Failed` - internal server error. 20 | 21 | 22 | -------------------------------------------------------------------------------- /docs/Model/ErrorPlainResponse.md: -------------------------------------------------------------------------------- 1 | # ErrorPlainResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **error** | **string** | | 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/ErrorResponse.md: -------------------------------------------------------------------------------- 1 | # ErrorResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/EventsGetResponse.md: -------------------------------------------------------------------------------- 1 | # EventsGetResponse 2 | Contains results from all activated products - Fingerprint Pro, Bot Detection, and others. 3 | 4 | 5 | ## Properties 6 | Name | Type | Description | Notes 7 | ------------ | ------------- | ------------- | ------------- 8 | **products** | [**\Fingerprint\ServerAPI\Model\Products**](Products.md) | | 9 | 10 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 11 | 12 | -------------------------------------------------------------------------------- /docs/Model/EventsUpdateRequest.md: -------------------------------------------------------------------------------- 1 | # EventsUpdateRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **linked_id** | **string** | LinkedID value to assign to the existing event | [optional] 7 | **tag** | array | | [optional] 8 | **suspect** | **bool** | Suspect flag indicating observed suspicious or fraudulent event | [optional] 9 | 10 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 11 | 12 | -------------------------------------------------------------------------------- /docs/Model/FactoryReset.md: -------------------------------------------------------------------------------- 1 | # FactoryReset 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **time** | [**\DateTime**](\DateTime.md) | Indicates the time (in UTC) of the most recent factory reset that happened on the **mobile device**. When a factory reset cannot be detected on the mobile device or when the request is initiated from a browser, this field will correspond to the *epoch* time (i.e 1 Jan 1970 UTC). See [Factory Reset Detection](https://dev.fingerprint.com/docs/smart-signals-overview#factory-reset-detection) to learn more about this Smart Signal. | 7 | **timestamp** | **int** | This field is just another representation of the value in the `time` field. The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. | 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/Frida.md: -------------------------------------------------------------------------------- 1 | # Frida 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | [Frida](https://frida.re/docs/) detection for Android and iOS devices. There are 2 values: * `true` - Frida detected * `false` - No signs of Frida or the client is not a mobile device. | 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/Geolocation.md: -------------------------------------------------------------------------------- 1 | # Geolocation 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **accuracy_radius** | **int** | The IP address is likely to be within this radius (in km) of the specified location. | [optional] 7 | **latitude** | **double** | | [optional] 8 | **longitude** | **double** | | [optional] 9 | **postal_code** | **string** | | [optional] 10 | **timezone** | **string** | | [optional] 11 | **city** | [**\Fingerprint\ServerAPI\Model\GeolocationCity**](GeolocationCity.md) | | [optional] 12 | **country** | [**\Fingerprint\ServerAPI\Model\GeolocationCountry**](GeolocationCountry.md) | | [optional] 13 | **continent** | [**\Fingerprint\ServerAPI\Model\GeolocationContinent**](GeolocationContinent.md) | | [optional] 14 | **subdivisions** | array | | [optional] 15 | 16 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 17 | 18 | -------------------------------------------------------------------------------- /docs/Model/GeolocationCity.md: -------------------------------------------------------------------------------- 1 | # GeolocationCity 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **name** | **string** | | 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/GeolocationContinent.md: -------------------------------------------------------------------------------- 1 | # GeolocationContinent 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **code** | **string** | | 7 | **name** | **string** | | 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/GeolocationCountry.md: -------------------------------------------------------------------------------- 1 | # GeolocationCountry 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **code** | **string** | | 7 | **name** | **string** | | 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/HighActivity.md: -------------------------------------------------------------------------------- 1 | # HighActivity 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | Flag indicating if the request came from a high-activity visitor. | 7 | **daily_requests** | **int** | Number of requests from the same visitor in the previous day. | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/IPBlocklist.md: -------------------------------------------------------------------------------- 1 | # IPBlocklist 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | `true` if request IP address is part of any database that we use to search for known malicious actors, `false` otherwise. | 7 | **details** | [**\Fingerprint\ServerAPI\Model\IPBlocklistDetails**](IPBlocklistDetails.md) | | 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/IPBlocklistDetails.md: -------------------------------------------------------------------------------- 1 | # IPBlocklistDetails 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **email_spam** | **bool** | IP address was part of a known email spam attack (SMTP). | 7 | **attack_source** | **bool** | IP address was part of a known network attack (SSH/HTTPS). | 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/IPInfo.md: -------------------------------------------------------------------------------- 1 | # IPInfo 2 | Details about the request IP address. Has separate fields for v4 and v6 IP address versions. 3 | 4 | 5 | ## Properties 6 | Name | Type | Description | Notes 7 | ------------ | ------------- | ------------- | ------------- 8 | **v4** | [**\Fingerprint\ServerAPI\Model\IPInfoV4**](IPInfoV4.md) | | [optional] 9 | **v6** | [**\Fingerprint\ServerAPI\Model\IPInfoV6**](IPInfoV6.md) | | [optional] 10 | 11 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 12 | 13 | -------------------------------------------------------------------------------- /docs/Model/IPInfoASN.md: -------------------------------------------------------------------------------- 1 | # IPInfoASN 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **asn** | **string** | | 7 | **name** | **string** | | 8 | **network** | **string** | | 9 | 10 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 11 | 12 | -------------------------------------------------------------------------------- /docs/Model/IPInfoDataCenter.md: -------------------------------------------------------------------------------- 1 | # IPInfoDataCenter 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | | 7 | **name** | **string** | | 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/IPInfoV4.md: -------------------------------------------------------------------------------- 1 | # IPInfoV4 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **address** | **string** | | 7 | **geolocation** | [**\Fingerprint\ServerAPI\Model\Geolocation**](Geolocation.md) | | 8 | **asn** | [**\Fingerprint\ServerAPI\Model\IPInfoASN**](IPInfoASN.md) | | [optional] 9 | **datacenter** | [**\Fingerprint\ServerAPI\Model\IPInfoDataCenter**](IPInfoDataCenter.md) | | [optional] 10 | 11 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 12 | 13 | -------------------------------------------------------------------------------- /docs/Model/IPInfoV6.md: -------------------------------------------------------------------------------- 1 | # IPInfoV6 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **address** | **string** | | 7 | **geolocation** | [**\Fingerprint\ServerAPI\Model\Geolocation**](Geolocation.md) | | 8 | **asn** | [**\Fingerprint\ServerAPI\Model\IPInfoASN**](IPInfoASN.md) | | [optional] 9 | **datacenter** | [**\Fingerprint\ServerAPI\Model\IPInfoDataCenter**](IPInfoDataCenter.md) | | [optional] 10 | 11 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 12 | 13 | -------------------------------------------------------------------------------- /docs/Model/Identification.md: -------------------------------------------------------------------------------- 1 | # Identification 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **visitor_id** | **string** | String of 20 characters that uniquely identifies the visitor's browser. | 7 | **request_id** | **string** | Unique identifier of the user's request. | 8 | **browser_details** | [**\Fingerprint\ServerAPI\Model\BrowserDetails**](BrowserDetails.md) | | 9 | **incognito** | **bool** | Flag if user used incognito session. | 10 | **ip** | **string** | IP address of the requesting browser or bot. | 11 | **ip_location** | [**\Fingerprint\ServerAPI\Model\DeprecatedGeolocation**](DeprecatedGeolocation.md) | | [optional] 12 | **linked_id** | **string** | A customer-provided id that was sent with the request. | [optional] 13 | **suspect** | **bool** | Field is `true` if you have previously set the `suspect` flag for this event using the [Server API Update event endpoint](https://dev.fingerprint.com/reference/updateevent). | [optional] 14 | **timestamp** | **int** | Timestamp of the event with millisecond precision in Unix time. | 15 | **time** | [**\DateTime**](\DateTime.md) | Time expressed according to ISO 8601 in UTC format, when the request from the JS agent was made. We recommend to treat requests that are older than 2 minutes as malicious. Otherwise, request replay attacks are possible. | 16 | **url** | **string** | Page URL from which the request was sent. | 17 | **tag** | array | | 18 | **confidence** | [**\Fingerprint\ServerAPI\Model\IdentificationConfidence**](IdentificationConfidence.md) | | [optional] 19 | **visitor_found** | **bool** | Attribute represents if a visitor had been identified before. | 20 | **first_seen_at** | [**\Fingerprint\ServerAPI\Model\IdentificationSeenAt**](IdentificationSeenAt.md) | | 21 | **last_seen_at** | [**\Fingerprint\ServerAPI\Model\IdentificationSeenAt**](IdentificationSeenAt.md) | | 22 | **components** | array | | [optional] 23 | 24 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 25 | 26 | -------------------------------------------------------------------------------- /docs/Model/IdentificationConfidence.md: -------------------------------------------------------------------------------- 1 | # IdentificationConfidence 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **score** | **double** | The confidence score is a floating-point number between 0 and 1 that represents the probability of accurate identification. | 7 | **revision** | **string** | The revision name of the method used to calculate the Confidence score. This field is only present for customers who opted in to an alternative calculation method. | [optional] 8 | **comment** | **string** | | [optional] 9 | 10 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 11 | 12 | -------------------------------------------------------------------------------- /docs/Model/IdentificationSeenAt.md: -------------------------------------------------------------------------------- 1 | # IdentificationSeenAt 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **global** | [**\DateTime**](\DateTime.md) | | 7 | **subscription** | [**\DateTime**](\DateTime.md) | | 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/Incognito.md: -------------------------------------------------------------------------------- 1 | # Incognito 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | `true` if we detected incognito mode used in the browser, `false` otherwise. | 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/Jailbroken.md: -------------------------------------------------------------------------------- 1 | # Jailbroken 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | iOS specific jailbreak detection. There are 2 values: * `true` - Jailbreak detected. * `false` - No signs of jailbreak or the client is not iOS. | 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/LocationSpoofing.md: -------------------------------------------------------------------------------- 1 | # LocationSpoofing 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | Flag indicating whether the request came from a mobile device with location spoofing enabled. | 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/MitMAttack.md: -------------------------------------------------------------------------------- 1 | # MitMAttack 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | * `true` - When requests made from your users' mobile devices to Fingerprint servers have been intercepted and potentially modified. * `false` - Otherwise or when the request originated from a browser. See [MitM Attack Detection](https://dev.fingerprint.com/docs/smart-signals-reference#mitm-attack-detection) to learn more about this Smart Signal. | 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/PrivacySettings.md: -------------------------------------------------------------------------------- 1 | # PrivacySettings 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | `true` if the request is from a privacy aware browser (e.g. Tor) or from a browser in which fingerprinting is blocked. Otherwise `false`. | 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/ProductBotd.md: -------------------------------------------------------------------------------- 1 | # ProductBotd 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\Botd**](Botd.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductClonedApp.md: -------------------------------------------------------------------------------- 1 | # ProductClonedApp 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\ClonedApp**](ClonedApp.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductDeveloperTools.md: -------------------------------------------------------------------------------- 1 | # ProductDeveloperTools 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\DeveloperTools**](DeveloperTools.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductEmulator.md: -------------------------------------------------------------------------------- 1 | # ProductEmulator 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\Emulator**](Emulator.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductFactoryReset.md: -------------------------------------------------------------------------------- 1 | # ProductFactoryReset 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\FactoryReset**](FactoryReset.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductFrida.md: -------------------------------------------------------------------------------- 1 | # ProductFrida 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\Frida**](Frida.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductHighActivity.md: -------------------------------------------------------------------------------- 1 | # ProductHighActivity 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\HighActivity**](HighActivity.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductIPBlocklist.md: -------------------------------------------------------------------------------- 1 | # ProductIPBlocklist 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\IPBlocklist**](IPBlocklist.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductIPInfo.md: -------------------------------------------------------------------------------- 1 | # ProductIPInfo 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\IPInfo**](IPInfo.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductIdentification.md: -------------------------------------------------------------------------------- 1 | # ProductIdentification 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\Identification**](Identification.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductIncognito.md: -------------------------------------------------------------------------------- 1 | # ProductIncognito 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\Incognito**](Incognito.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductJailbroken.md: -------------------------------------------------------------------------------- 1 | # ProductJailbroken 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\Jailbroken**](Jailbroken.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductLocationSpoofing.md: -------------------------------------------------------------------------------- 1 | # ProductLocationSpoofing 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\LocationSpoofing**](LocationSpoofing.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductMitMAttack.md: -------------------------------------------------------------------------------- 1 | # ProductMitMAttack 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\MitMAttack**](MitMAttack.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductPrivacySettings.md: -------------------------------------------------------------------------------- 1 | # ProductPrivacySettings 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\PrivacySettings**](PrivacySettings.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductProxy.md: -------------------------------------------------------------------------------- 1 | # ProductProxy 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\Proxy**](Proxy.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductRawDeviceAttributes.md: -------------------------------------------------------------------------------- 1 | # ProductRawDeviceAttributes 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | array | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductRemoteControl.md: -------------------------------------------------------------------------------- 1 | # ProductRemoteControl 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\RemoteControl**](RemoteControl.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductRootApps.md: -------------------------------------------------------------------------------- 1 | # ProductRootApps 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\RootApps**](RootApps.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductSuspectScore.md: -------------------------------------------------------------------------------- 1 | # ProductSuspectScore 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\SuspectScore**](SuspectScore.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductTampering.md: -------------------------------------------------------------------------------- 1 | # ProductTampering 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\Tampering**](Tampering.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductTor.md: -------------------------------------------------------------------------------- 1 | # ProductTor 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\Tor**](Tor.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductVPN.md: -------------------------------------------------------------------------------- 1 | # ProductVPN 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\VPN**](VPN.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductVelocity.md: -------------------------------------------------------------------------------- 1 | # ProductVelocity 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\Velocity**](Velocity.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProductVirtualMachine.md: -------------------------------------------------------------------------------- 1 | # ProductVirtualMachine 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**\Fingerprint\ServerAPI\Model\VirtualMachine**](VirtualMachine.md) | | [optional] 7 | **error** | [**\Fingerprint\ServerAPI\Model\Error**](Error.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/Products.md: -------------------------------------------------------------------------------- 1 | # Products 2 | Contains all information about the request identified by `requestId`, depending on the pricing plan (Pro, Pro Plus, Enterprise) 3 | 4 | 5 | ## Properties 6 | Name | Type | Description | Notes 7 | ------------ | ------------- | ------------- | ------------- 8 | **identification** | [**\Fingerprint\ServerAPI\Model\ProductIdentification**](ProductIdentification.md) | | [optional] 9 | **botd** | [**\Fingerprint\ServerAPI\Model\ProductBotd**](ProductBotd.md) | | [optional] 10 | **root_apps** | [**\Fingerprint\ServerAPI\Model\ProductRootApps**](ProductRootApps.md) | | [optional] 11 | **emulator** | [**\Fingerprint\ServerAPI\Model\ProductEmulator**](ProductEmulator.md) | | [optional] 12 | **ip_info** | [**\Fingerprint\ServerAPI\Model\ProductIPInfo**](ProductIPInfo.md) | | [optional] 13 | **ip_blocklist** | [**\Fingerprint\ServerAPI\Model\ProductIPBlocklist**](ProductIPBlocklist.md) | | [optional] 14 | **tor** | [**\Fingerprint\ServerAPI\Model\ProductTor**](ProductTor.md) | | [optional] 15 | **vpn** | [**\Fingerprint\ServerAPI\Model\ProductVPN**](ProductVPN.md) | | [optional] 16 | **proxy** | [**\Fingerprint\ServerAPI\Model\ProductProxy**](ProductProxy.md) | | [optional] 17 | **incognito** | [**\Fingerprint\ServerAPI\Model\ProductIncognito**](ProductIncognito.md) | | [optional] 18 | **tampering** | [**\Fingerprint\ServerAPI\Model\ProductTampering**](ProductTampering.md) | | [optional] 19 | **cloned_app** | [**\Fingerprint\ServerAPI\Model\ProductClonedApp**](ProductClonedApp.md) | | [optional] 20 | **factory_reset** | [**\Fingerprint\ServerAPI\Model\ProductFactoryReset**](ProductFactoryReset.md) | | [optional] 21 | **jailbroken** | [**\Fingerprint\ServerAPI\Model\ProductJailbroken**](ProductJailbroken.md) | | [optional] 22 | **frida** | [**\Fingerprint\ServerAPI\Model\ProductFrida**](ProductFrida.md) | | [optional] 23 | **privacy_settings** | [**\Fingerprint\ServerAPI\Model\ProductPrivacySettings**](ProductPrivacySettings.md) | | [optional] 24 | **virtual_machine** | [**\Fingerprint\ServerAPI\Model\ProductVirtualMachine**](ProductVirtualMachine.md) | | [optional] 25 | **raw_device_attributes** | [**\Fingerprint\ServerAPI\Model\ProductRawDeviceAttributes**](ProductRawDeviceAttributes.md) | | [optional] 26 | **high_activity** | [**\Fingerprint\ServerAPI\Model\ProductHighActivity**](ProductHighActivity.md) | | [optional] 27 | **location_spoofing** | [**\Fingerprint\ServerAPI\Model\ProductLocationSpoofing**](ProductLocationSpoofing.md) | | [optional] 28 | **suspect_score** | [**\Fingerprint\ServerAPI\Model\ProductSuspectScore**](ProductSuspectScore.md) | | [optional] 29 | **remote_control** | [**\Fingerprint\ServerAPI\Model\ProductRemoteControl**](ProductRemoteControl.md) | | [optional] 30 | **velocity** | [**\Fingerprint\ServerAPI\Model\ProductVelocity**](ProductVelocity.md) | | [optional] 31 | **developer_tools** | [**\Fingerprint\ServerAPI\Model\ProductDeveloperTools**](ProductDeveloperTools.md) | | [optional] 32 | **mitm_attack** | [**\Fingerprint\ServerAPI\Model\ProductMitMAttack**](ProductMitMAttack.md) | | [optional] 33 | 34 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 35 | 36 | -------------------------------------------------------------------------------- /docs/Model/Proxy.md: -------------------------------------------------------------------------------- 1 | # Proxy 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | IP address was used by a public proxy provider or belonged to a known recent residential proxy | 7 | **confidence** | [**\Fingerprint\ServerAPI\Model\ProxyConfidence**](ProxyConfidence.md) | | 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ProxyConfidence.md: -------------------------------------------------------------------------------- 1 | # ProxyConfidence 2 | Confidence level of the proxy detection. 3 | If a proxy is not detected, confidence is "high". 4 | If it's detected, can be "low", "medium", or "high". 5 | 6 | 7 | -------------------------------------------------------------------------------- /docs/Model/RelatedVisitor.md: -------------------------------------------------------------------------------- 1 | # RelatedVisitor 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **visitor_id** | **string** | Visitor ID of a browser that originates from the same mobile device as the input visitor ID. | 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/RelatedVisitorsResponse.md: -------------------------------------------------------------------------------- 1 | # RelatedVisitorsResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **related_visitors** | [**\Fingerprint\ServerAPI\Model\RelatedVisitor[]**](RelatedVisitor.md) | | 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/RemoteControl.md: -------------------------------------------------------------------------------- 1 | # RemoteControl 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | `true` if the request came from a machine being remotely controlled (e.g. TeamViewer), `false` otherwise. | 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/RootApps.md: -------------------------------------------------------------------------------- 1 | # RootApps 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | Android specific root management apps detection. There are 2 values: * `true` - Root Management Apps detected (e.g. Magisk). * `false` - No Root Management Apps detected or the client isn't Android. | 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/SearchEventsResponse.md: -------------------------------------------------------------------------------- 1 | # SearchEventsResponse 2 | Contains a list of all identification events matching the specified search criteria. 3 | 4 | 5 | ## Properties 6 | Name | Type | Description | Notes 7 | ------------ | ------------- | ------------- | ------------- 8 | **events** | [**\Fingerprint\ServerAPI\Model\SearchEventsResponseEvents[]**](SearchEventsResponseEvents.md) | | [optional] 9 | **pagination_key** | **string** | Use this value in the `pagination_key` parameter to request the next page of search results. | [optional] 10 | 11 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 12 | 13 | -------------------------------------------------------------------------------- /docs/Model/SearchEventsResponseEvents.md: -------------------------------------------------------------------------------- 1 | # SearchEventsResponseEvents 2 | Device intelligence results for the identification event. 3 | 4 | 5 | ## Properties 6 | Name | Type | Description | Notes 7 | ------------ | ------------- | ------------- | ------------- 8 | **products** | [**\Fingerprint\ServerAPI\Model\Products**](Products.md) | | 9 | 10 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 11 | 12 | -------------------------------------------------------------------------------- /docs/Model/SuspectScore.md: -------------------------------------------------------------------------------- 1 | # SuspectScore 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **int** | Suspect Score is an easy way to integrate Smart Signals into your fraud protection work flow. It is a weighted representation of all Smart Signals present in the payload that helps identify suspicious activity. The value range is [0; S] where S is sum of all Smart Signals weights. See more details here: https://dev.fingerprint.com/docs/suspect-score | 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/Tampering.md: -------------------------------------------------------------------------------- 1 | # Tampering 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | Indicates if an identification request from a browser or an Android SDK has been tampered with. Not supported in the iOS SDK, is always `false` for iOS requests. * `true` - If the request meets either of the following conditions: * Contains anomalous browser or device attributes that could not have been legitimately produced by the JavaScript agent or the Android SDK (see `anomalyScore`). * Originated from an anti-detect browser like Incognition (see `antiDetectBrowser`). * `false` - If the request is considered genuine or was generated by the iOS SDK. | 7 | **anomaly_score** | **double** | A score that indicates the extent of anomalous data in the request. This field applies to requests originating from **both** browsers and Android SDKs. * Values above `0.5` indicate that the request has been tampered with. * Values below `0.5` indicate that the request is genuine. | 8 | **anti_detect_browser** | **bool** | Anti-detect browsers try to evade identification by masking or manipulating their fingerprint to imitate legitimate browser configurations. This field does not apply to requests originating from mobile SDKs. * `true` - The browser resembles a known anti-detect browser, for example, Incognition. * `false` - The browser does not resemble an anti-detect browser or the request originates from a mobile SDK. | 9 | 10 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 11 | 12 | -------------------------------------------------------------------------------- /docs/Model/Tor.md: -------------------------------------------------------------------------------- 1 | # Tor 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | `true` if the request IP address is a known tor exit node, `false` otherwise. | 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/VPN.md: -------------------------------------------------------------------------------- 1 | # VPN 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | VPN or other anonymizing service has been used when sending the request. | 7 | **confidence** | [**\Fingerprint\ServerAPI\Model\VPNConfidence**](VPNConfidence.md) | | 8 | **origin_timezone** | **string** | Local timezone which is used in timezoneMismatch method. | 9 | **origin_country** | **string** | Country of the request (only for Android SDK version >= 2.4.0, ISO 3166 format or unknown). | 10 | **methods** | [**\Fingerprint\ServerAPI\Model\VPNMethods**](VPNMethods.md) | | 11 | 12 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 13 | 14 | -------------------------------------------------------------------------------- /docs/Model/VPNConfidence.md: -------------------------------------------------------------------------------- 1 | # VPNConfidence 2 | A confidence rating for the VPN detection result — "low", "medium", or "high". Depends on the combination of results returned from all VPN detection methods. 3 | 4 | -------------------------------------------------------------------------------- /docs/Model/VPNMethods.md: -------------------------------------------------------------------------------- 1 | # VPNMethods 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **timezone_mismatch** | **bool** | The browser timezone doesn't match the timezone inferred from the request IP address. | 7 | **public_vpn** | **bool** | Request IP address is owned and used by a public VPN service provider. | 8 | **auxiliary_mobile** | **bool** | This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices. | 9 | **os_mismatch** | **bool** | The browser runs on a different operating system than the operating system inferred from the request network signature. | 10 | **relay** | **bool** | Request IP address belongs to a relay service provider, indicating the use of relay services like [Apple Private relay](https://support.apple.com/en-us/102602) or [Cloudflare Warp](https://developers.cloudflare.com/warp-client/). * Like VPNs, relay services anonymize the visitor's true IP address. * Unlike traditional VPNs, relay services don't let visitors spoof their location by choosing an exit node in a different country. This field allows you to differentiate VPN users and relay service users in your fraud prevention logic. | 11 | 12 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 13 | 14 | -------------------------------------------------------------------------------- /docs/Model/Velocity.md: -------------------------------------------------------------------------------- 1 | # Velocity 2 | Sums key data points for a specific `visitorId`, `ipAddress` and `linkedId` at three distinct time 3 | intervals: 5 minutes, 1 hour, and 24 hours as follows: 4 | 5 | - Number of distinct IP addresses associated to the visitor ID. 6 | - Number of distinct linked IDs associated with the visitor ID. 7 | - Number of distinct countries associated with the visitor ID. 8 | - Number of identification events associated with the visitor ID. 9 | - Number of identification events associated with the detected IP address. 10 | - Number of distinct IP addresses associated with the provided linked ID. 11 | - Number of distinct visitor IDs associated with the provided linked ID. 12 | 13 | The `24h` interval of `distinctIp`, `distinctLinkedId`, `distinctCountry`, 14 | `distinctIpByLinkedId` and `distinctVisitorIdByLinkedId` will be omitted 15 | if the number of `events` for the visitor ID in the last 24 16 | hours (`events.intervals.['24h']`) is higher than 20.000. 17 | 18 | 19 | 20 | ## Properties 21 | Name | Type | Description | Notes 22 | ------------ | ------------- | ------------- | ------------- 23 | **distinct_ip** | [**\Fingerprint\ServerAPI\Model\VelocityData**](VelocityData.md) | | 24 | **distinct_linked_id** | [**\Fingerprint\ServerAPI\Model\VelocityData**](VelocityData.md) | | 25 | **distinct_country** | [**\Fingerprint\ServerAPI\Model\VelocityData**](VelocityData.md) | | 26 | **events** | [**\Fingerprint\ServerAPI\Model\VelocityData**](VelocityData.md) | | 27 | **ip_events** | [**\Fingerprint\ServerAPI\Model\VelocityData**](VelocityData.md) | | 28 | **distinct_ip_by_linked_id** | [**\Fingerprint\ServerAPI\Model\VelocityData**](VelocityData.md) | | 29 | **distinct_visitor_id_by_linked_id** | [**\Fingerprint\ServerAPI\Model\VelocityData**](VelocityData.md) | | 30 | 31 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 32 | 33 | -------------------------------------------------------------------------------- /docs/Model/VelocityData.md: -------------------------------------------------------------------------------- 1 | # VelocityData 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **intervals** | [**\Fingerprint\ServerAPI\Model\VelocityIntervals**](VelocityIntervals.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/VelocityIntervals.md: -------------------------------------------------------------------------------- 1 | # VelocityIntervals 2 | Is absent if the velocity data could not be generated for the visitor ID. 3 | 4 | 5 | 6 | ## Properties 7 | Name | Type | Description | Notes 8 | ------------ | ------------- | ------------- | ------------- 9 | **_5m** | **int** | | 10 | **_1h** | **int** | | 11 | **_24h** | **int** | The `24h` interval of `distinctIp`, `distinctLinkedId`, `distinctCountry`, `distinctIpByLinkedId` and `distinctVisitorIdByLinkedId` will be omitted if the number of `events`` for the visitor ID in the last 24 hours (`events.intervals.['24h']`) is higher than 20.000. | [optional] 12 | 13 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 14 | 15 | -------------------------------------------------------------------------------- /docs/Model/VirtualMachine.md: -------------------------------------------------------------------------------- 1 | # VirtualMachine 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | `true` if the request came from a browser running inside a virtual machine (e.g. VMWare), `false` otherwise. | 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/Visit.md: -------------------------------------------------------------------------------- 1 | # Visit 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **string** | Unique identifier of the user's request. | 7 | **browser_details** | [**\Fingerprint\ServerAPI\Model\BrowserDetails**](BrowserDetails.md) | | 8 | **incognito** | **bool** | Flag if user used incognito session. | 9 | **ip** | **string** | IP address of the requesting browser or bot. | 10 | **ip_location** | [**\Fingerprint\ServerAPI\Model\DeprecatedGeolocation**](DeprecatedGeolocation.md) | | [optional] 11 | **linked_id** | **string** | A customer-provided id that was sent with the request. | [optional] 12 | **timestamp** | **int** | Timestamp of the event with millisecond precision in Unix time. | 13 | **time** | [**\DateTime**](\DateTime.md) | Time expressed according to ISO 8601 in UTC format, when the request from the client agent was made. We recommend to treat requests that are older than 2 minutes as malicious. Otherwise, request replay attacks are possible. | 14 | **url** | **string** | Page URL from which the request was sent. | 15 | **tag** | array | | 16 | **confidence** | [**\Fingerprint\ServerAPI\Model\IdentificationConfidence**](IdentificationConfidence.md) | | [optional] 17 | **visitor_found** | **bool** | Attribute represents if a visitor had been identified before. | 18 | **first_seen_at** | [**\Fingerprint\ServerAPI\Model\IdentificationSeenAt**](IdentificationSeenAt.md) | | 19 | **last_seen_at** | [**\Fingerprint\ServerAPI\Model\IdentificationSeenAt**](IdentificationSeenAt.md) | | 20 | **components** | array | | [optional] 21 | 22 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 23 | 24 | -------------------------------------------------------------------------------- /docs/Model/VisitorsGetResponse.md: -------------------------------------------------------------------------------- 1 | # VisitorsGetResponse 2 | Pagination-related fields `lastTimestamp` and `paginationKey` are included if you use a pagination parameter like `limit` or `before` and there is more data available on the next page. 3 | 4 | 5 | ## Properties 6 | Name | Type | Description | Notes 7 | ------------ | ------------- | ------------- | ------------- 8 | **visitor_id** | **string** | | 9 | **visits** | [**\Fingerprint\ServerAPI\Model\Visit[]**](Visit.md) | | 10 | **last_timestamp** | **int** | ⚠️ Deprecated paging attribute, please use `paginationKey` instead. Timestamp of the last visit in the current page of results. | [optional] 11 | **pagination_key** | **string** | Request ID of the last visit in the current page of results. Use this value in the following request as the `paginationKey` parameter to get the next page of results. | [optional] 12 | 13 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 14 | 15 | -------------------------------------------------------------------------------- /docs/Model/Webhook.md: -------------------------------------------------------------------------------- 1 | # Webhook 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **string** | Unique identifier of the user's request. | 7 | **url** | **string** | Page URL from which the request was sent. | 8 | **ip** | **string** | IP address of the requesting browser or bot. | 9 | **environment_id** | **string** | Environment ID of the event. | [optional] 10 | **tag** | array | | [optional] 11 | **time** | [**\DateTime**](\DateTime.md) | Time expressed according to ISO 8601 in UTC format, when the request from the JS agent was made. We recommend to treat requests that are older than 2 minutes as malicious. Otherwise, request replay attacks are possible. | 12 | **timestamp** | **int** | Timestamp of the event with millisecond precision in Unix time. | 13 | **ip_location** | [**\Fingerprint\ServerAPI\Model\DeprecatedGeolocation**](DeprecatedGeolocation.md) | | [optional] 14 | **linked_id** | **string** | A customer-provided id that was sent with the request. | [optional] 15 | **visitor_id** | **string** | String of 20 characters that uniquely identifies the visitor's browser. | [optional] 16 | **visitor_found** | **bool** | Attribute represents if a visitor had been identified before. | [optional] 17 | **confidence** | [**\Fingerprint\ServerAPI\Model\IdentificationConfidence**](IdentificationConfidence.md) | | [optional] 18 | **first_seen_at** | [**\Fingerprint\ServerAPI\Model\IdentificationSeenAt**](IdentificationSeenAt.md) | | [optional] 19 | **last_seen_at** | [**\Fingerprint\ServerAPI\Model\IdentificationSeenAt**](IdentificationSeenAt.md) | | [optional] 20 | **browser_details** | [**\Fingerprint\ServerAPI\Model\BrowserDetails**](BrowserDetails.md) | | [optional] 21 | **incognito** | **bool** | Flag if user used incognito session. | [optional] 22 | **client_referrer** | **string** | | [optional] 23 | **components** | array | | [optional] 24 | **bot** | [**\Fingerprint\ServerAPI\Model\BotdBot**](BotdBot.md) | | [optional] 25 | **user_agent** | **string** | | [optional] 26 | **root_apps** | [**\Fingerprint\ServerAPI\Model\WebhookRootApps**](WebhookRootApps.md) | | [optional] 27 | **emulator** | [**\Fingerprint\ServerAPI\Model\WebhookEmulator**](WebhookEmulator.md) | | [optional] 28 | **ip_info** | [**\Fingerprint\ServerAPI\Model\WebhookIPInfo**](WebhookIPInfo.md) | | [optional] 29 | **ip_blocklist** | [**\Fingerprint\ServerAPI\Model\WebhookIPBlocklist**](WebhookIPBlocklist.md) | | [optional] 30 | **tor** | [**\Fingerprint\ServerAPI\Model\WebhookTor**](WebhookTor.md) | | [optional] 31 | **vpn** | [**\Fingerprint\ServerAPI\Model\WebhookVPN**](WebhookVPN.md) | | [optional] 32 | **proxy** | [**\Fingerprint\ServerAPI\Model\WebhookProxy**](WebhookProxy.md) | | [optional] 33 | **tampering** | [**\Fingerprint\ServerAPI\Model\WebhookTampering**](WebhookTampering.md) | | [optional] 34 | **cloned_app** | [**\Fingerprint\ServerAPI\Model\WebhookClonedApp**](WebhookClonedApp.md) | | [optional] 35 | **factory_reset** | [**\Fingerprint\ServerAPI\Model\WebhookFactoryReset**](WebhookFactoryReset.md) | | [optional] 36 | **jailbroken** | [**\Fingerprint\ServerAPI\Model\WebhookJailbroken**](WebhookJailbroken.md) | | [optional] 37 | **frida** | [**\Fingerprint\ServerAPI\Model\WebhookFrida**](WebhookFrida.md) | | [optional] 38 | **privacy_settings** | [**\Fingerprint\ServerAPI\Model\WebhookPrivacySettings**](WebhookPrivacySettings.md) | | [optional] 39 | **virtual_machine** | [**\Fingerprint\ServerAPI\Model\WebhookVirtualMachine**](WebhookVirtualMachine.md) | | [optional] 40 | **raw_device_attributes** | array | | [optional] 41 | **high_activity** | [**\Fingerprint\ServerAPI\Model\WebhookHighActivity**](WebhookHighActivity.md) | | [optional] 42 | **location_spoofing** | [**\Fingerprint\ServerAPI\Model\WebhookLocationSpoofing**](WebhookLocationSpoofing.md) | | [optional] 43 | **suspect_score** | [**\Fingerprint\ServerAPI\Model\WebhookSuspectScore**](WebhookSuspectScore.md) | | [optional] 44 | **remote_control** | [**\Fingerprint\ServerAPI\Model\WebhookRemoteControl**](WebhookRemoteControl.md) | | [optional] 45 | **velocity** | [**\Fingerprint\ServerAPI\Model\WebhookVelocity**](WebhookVelocity.md) | | [optional] 46 | **developer_tools** | [**\Fingerprint\ServerAPI\Model\WebhookDeveloperTools**](WebhookDeveloperTools.md) | | [optional] 47 | **mitm_attack** | [**\Fingerprint\ServerAPI\Model\WebhookMitMAttack**](WebhookMitMAttack.md) | | [optional] 48 | 49 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 50 | 51 | -------------------------------------------------------------------------------- /docs/Model/WebhookClonedApp.md: -------------------------------------------------------------------------------- 1 | # WebhookClonedApp 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | Android specific cloned application detection. There are 2 values: * `true` - Presence of app cloners work detected (e.g. fully cloned application found or launch of it inside of a not main working profile detected). * `false` - No signs of cloned application detected or the client is not Android. | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/WebhookDeveloperTools.md: -------------------------------------------------------------------------------- 1 | # WebhookDeveloperTools 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | `true` if the browser is Chrome with DevTools open or Firefox with Developer Tools open, `false` otherwise. | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/WebhookEmulator.md: -------------------------------------------------------------------------------- 1 | # WebhookEmulator 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | Android specific emulator detection. There are 2 values: * `true` - Emulated environment detected (e.g. launch inside of AVD). * `false` - No signs of emulated environment detected or the client is not Android. | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/WebhookFactoryReset.md: -------------------------------------------------------------------------------- 1 | # WebhookFactoryReset 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **time** | [**\DateTime**](\DateTime.md) | Indicates the time (in UTC) of the most recent factory reset that happened on the **mobile device**. When a factory reset cannot be detected on the mobile device or when the request is initiated from a browser, this field will correspond to the *epoch* time (i.e 1 Jan 1970 UTC). See [Factory Reset Detection](https://dev.fingerprint.com/docs/smart-signals-overview#factory-reset-detection) to learn more about this Smart Signal. | [optional] 7 | **timestamp** | **int** | This field is just another representation of the value in the `time` field. The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/WebhookFrida.md: -------------------------------------------------------------------------------- 1 | # WebhookFrida 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | [Frida](https://frida.re/docs/) detection for Android and iOS devices. There are 2 values: * `true` - Frida detected * `false` - No signs of Frida or the client is not a mobile device. | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/WebhookHighActivity.md: -------------------------------------------------------------------------------- 1 | # WebhookHighActivity 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | Flag indicating if the request came from a high-activity visitor. | 7 | **daily_requests** | **int** | Number of requests from the same visitor in the previous day. | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/WebhookIPBlocklist.md: -------------------------------------------------------------------------------- 1 | # WebhookIPBlocklist 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | `true` if request IP address is part of any database that we use to search for known malicious actors, `false` otherwise. | [optional] 7 | **details** | [**\Fingerprint\ServerAPI\Model\IPBlocklistDetails**](IPBlocklistDetails.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/WebhookIPInfo.md: -------------------------------------------------------------------------------- 1 | # WebhookIPInfo 2 | Details about the request IP address. Has separate fields for v4 and v6 IP address versions. 3 | 4 | 5 | ## Properties 6 | Name | Type | Description | Notes 7 | ------------ | ------------- | ------------- | ------------- 8 | **v4** | [**\Fingerprint\ServerAPI\Model\IPInfoV4**](IPInfoV4.md) | | [optional] 9 | **v6** | [**\Fingerprint\ServerAPI\Model\IPInfoV6**](IPInfoV6.md) | | [optional] 10 | 11 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 12 | 13 | -------------------------------------------------------------------------------- /docs/Model/WebhookJailbroken.md: -------------------------------------------------------------------------------- 1 | # WebhookJailbroken 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | iOS specific jailbreak detection. There are 2 values: * `true` - Jailbreak detected. * `false` - No signs of jailbreak or the client is not iOS. | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/WebhookLocationSpoofing.md: -------------------------------------------------------------------------------- 1 | # WebhookLocationSpoofing 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | Flag indicating whether the request came from a mobile device with location spoofing enabled. | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/WebhookMitMAttack.md: -------------------------------------------------------------------------------- 1 | # WebhookMitMAttack 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | * `true` - When requests made from your users' mobile devices to Fingerprint servers have been intercepted and potentially modified. * `false` - Otherwise or when the request originated from a browser. See [MitM Attack Detection](https://dev.fingerprint.com/docs/smart-signals-overview#mitm-attack-detection) to learn more about this Smart Signal. | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/WebhookPrivacySettings.md: -------------------------------------------------------------------------------- 1 | # WebhookPrivacySettings 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | `true` if the request is from a privacy aware browser (e.g. Tor) or from a browser in which fingerprinting is blocked. Otherwise `false`. | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/WebhookProxy.md: -------------------------------------------------------------------------------- 1 | # WebhookProxy 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | IP address was used by a public proxy provider or belonged to a known recent residential proxy | [optional] 7 | **confidence** | [**\Fingerprint\ServerAPI\Model\ProxyConfidence**](ProxyConfidence.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/WebhookRemoteControl.md: -------------------------------------------------------------------------------- 1 | # WebhookRemoteControl 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | `true` if the request came from a machine being remotely controlled (e.g. TeamViewer), `false` otherwise. | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/WebhookRootApps.md: -------------------------------------------------------------------------------- 1 | # WebhookRootApps 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | Android specific root management apps detection. There are 2 values: * `true` - Root Management Apps detected (e.g. Magisk). * `false` - No Root Management Apps detected or the client isn't Android. | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/WebhookSuspectScore.md: -------------------------------------------------------------------------------- 1 | # WebhookSuspectScore 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **int** | Suspect Score is an easy way to integrate Smart Signals into your fraud protection work flow. It is a weighted representation of all Smart Signals present in the payload that helps identify suspicious activity. The value range is [0; S] where S is sum of all Smart Signals weights. See more details here: https://dev.fingerprint.com/docs/suspect-score | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/WebhookTampering.md: -------------------------------------------------------------------------------- 1 | # WebhookTampering 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | Indicates if an identification request from a browser or an Android SDK has been tampered with. Not supported in the iOS SDK, is always `false` for iOS requests. * `true` - If the request meets either of the following conditions: * Contains anomalous browser or device attributes that could not have been legitimately produced by the JavaScript agent or the Android SDK (see `anomalyScore`). * Originated from an anti-detect browser like Incognition (see `antiDetectBrowser`). * `false` - If the request is considered genuine or was generated by the iOS SDK. | [optional] 7 | **anomaly_score** | **double** | A score that indicates the extent of anomalous data in the request. This field applies to requests originating from **both** browsers and Android SDKs. * Values above `0.5` indicate that the request has been tampered with. * Values below `0.5` indicate that the request is genuine. | [optional] 8 | **anti_detect_browser** | **bool** | Anti-detect browsers try to evade identification by masking or manipulating their fingerprint to imitate legitimate browser configurations. This field does not apply to requests originating from mobile SDKs. * `true` - The browser resembles a known anti-detect browser, for example, Incognition. * `false` - The browser does not resemble an anti-detect browser or the request originates from a mobile SDK. | [optional] 9 | 10 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 11 | 12 | -------------------------------------------------------------------------------- /docs/Model/WebhookTor.md: -------------------------------------------------------------------------------- 1 | # WebhookTor 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | `true` if the request IP address is a known tor exit node, `false` otherwise. | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/WebhookVPN.md: -------------------------------------------------------------------------------- 1 | # WebhookVPN 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | VPN or other anonymizing service has been used when sending the request. | [optional] 7 | **confidence** | [**\Fingerprint\ServerAPI\Model\VPNConfidence**](VPNConfidence.md) | | [optional] 8 | **origin_timezone** | **string** | Local timezone which is used in timezoneMismatch method. | [optional] 9 | **origin_country** | **string** | Country of the request (only for Android SDK version >= 2.4.0, ISO 3166 format or unknown). | [optional] 10 | **methods** | [**\Fingerprint\ServerAPI\Model\VPNMethods**](VPNMethods.md) | | [optional] 11 | 12 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 13 | 14 | -------------------------------------------------------------------------------- /docs/Model/WebhookVelocity.md: -------------------------------------------------------------------------------- 1 | # WebhookVelocity 2 | Sums key data points for a specific `visitorId`, `ipAddress` and `linkedId` at three distinct time 3 | intervals: 5 minutes, 1 hour, and 24 hours as follows: 4 | 5 | - Number of distinct IP addresses associated to the visitor ID. 6 | - Number of distinct linked IDs associated with the visitor ID. 7 | - Number of distinct countries associated with the visitor ID. 8 | - Number of identification events associated with the visitor ID. 9 | - Number of identification events associated with the detected IP address. 10 | - Number of distinct IP addresses associated with the provided linked ID. 11 | - Number of distinct visitor IDs associated with the provided linked ID. 12 | 13 | The `24h` interval of `distinctIp`, `distinctLinkedId`, `distinctCountry`, 14 | `distinctIpByLinkedId` and `distinctVisitorIdByLinkedId` will be omitted 15 | if the number of `events` for the visitor ID in the last 24 16 | hours (`events.intervals.['24h']`) is higher than 20.000. 17 | 18 | 19 | 20 | ## Properties 21 | Name | Type | Description | Notes 22 | ------------ | ------------- | ------------- | ------------- 23 | **distinct_ip** | [**\Fingerprint\ServerAPI\Model\VelocityData**](VelocityData.md) | | [optional] 24 | **distinct_linked_id** | [**\Fingerprint\ServerAPI\Model\VelocityData**](VelocityData.md) | | [optional] 25 | **distinct_country** | [**\Fingerprint\ServerAPI\Model\VelocityData**](VelocityData.md) | | [optional] 26 | **events** | [**\Fingerprint\ServerAPI\Model\VelocityData**](VelocityData.md) | | [optional] 27 | **ip_events** | [**\Fingerprint\ServerAPI\Model\VelocityData**](VelocityData.md) | | [optional] 28 | **distinct_ip_by_linked_id** | [**\Fingerprint\ServerAPI\Model\VelocityData**](VelocityData.md) | | [optional] 29 | **distinct_visitor_id_by_linked_id** | [**\Fingerprint\ServerAPI\Model\VelocityData**](VelocityData.md) | | [optional] 30 | 31 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 32 | 33 | -------------------------------------------------------------------------------- /docs/Model/WebhookVirtualMachine.md: -------------------------------------------------------------------------------- 1 | # WebhookVirtualMachine 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **bool** | `true` if the request came from a browser running inside a virtual machine (e.g. VMWare), `false` otherwise. | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Sealed/DecryptionKey.md: -------------------------------------------------------------------------------- 1 | # DecryptionKey 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | |---------------|-------------------------|-----------------------------------------------------------------------------------|-------| 7 | | **Key** | **string** | Key generated in dashboard that will be used to decrypt sealed result | | 8 | | **Algorithm** | **DecryptionAlgorithm** | Algorithm to use for decryption. Currently only "aes-256-gcm" value is supported. | | 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Sealed/Sealed.md: -------------------------------------------------------------------------------- 1 | # Sealed 2 | 3 | ## **UnsealEventsResponse** 4 | > unsealEventResponse(sealed string, keys DecryptionKey[]): EventsGetResponse 5 | 6 | Decrypts the sealed response with provided keys. 7 | ### Required Parameters 8 | 9 | | Name | Type | Description | Notes | 10 | |------------|---------------------|------------------------------------------------------------------------------------------|-------| 11 | | **sealed** | **string** | Base64 encoded sealed data | | 12 | | **keys** | **DecryptionKey[]** | Decryption keys. The SDK will try to decrypt the result with each key until it succeeds. | | 13 | -------------------------------------------------------------------------------- /docs/Webhook.md: -------------------------------------------------------------------------------- 1 | # Webhook 2 | 3 | ## **IsValidWebhookSignature** 4 | 5 | > Fingerprint\ServerAPI\Webhook\WebhookVerifier::IsValidWebhookSignature(string $header, string $data, string $secret): bool 6 | 7 | Verifies the HMAC signature extracted from the "fpjs-event-signature" header of the incoming request. This is a part of the webhook signing process, which is available only for enterprise customers. 8 | If you wish to enable it, please [contact our support](https://fingerprint.com/support). 9 | 10 | ### Required Parameters 11 | 12 | | Name | Type | Description | Notes | 13 | |------------|------------|-----------------------------------------------------------|-------| 14 | | **header** | **string** | Value of the `fpjs-event-signature` header. | | 15 | | **data** | **string** | Body of the request from which above header was extracted. | | 16 | | **secret** | **string** | Your generated secret used to sign the request. | | 17 | -------------------------------------------------------------------------------- /generate_coverage_report.php: -------------------------------------------------------------------------------- 1 | 0 ? ($statementsCovered / $statementsTotal) * 100 : 0; 18 | 19 | $functionsCovered = (int) $metrics['coveredmethods']; 20 | $functionsTotal = (int) $metrics['methods']; 21 | $functionsPct = $functionsTotal > 0 ? ($functionsCovered / $functionsTotal) * 100 : 0; 22 | 23 | // Function to return color based on percentage 24 | function getCoverageStatus($percentage) 25 | { 26 | if ($percentage >= 80) { 27 | return ':green_circle:'; 28 | } 29 | if ($percentage >= 50) { 30 | return ':yellow_circle:'; 31 | } 32 | 33 | return ':red_circle:'; 34 | } 35 | 36 | // Generate JSON report 37 | $map = [ 38 | 'total' => [ 39 | 'statements' => ['pct' => number_format($statementsPct, 2)], 40 | ], 41 | ]; 42 | file_put_contents($outputPath.'index.json', json_encode($map)); 43 | 44 | // Generate Markdown report 45 | $markdown = "# Code Coverage Report\n\n"; 46 | $markdown .= "## Coverage Report\n\n"; 47 | $markdown .= "| St. | Category | Percentage | Covered / Total |\n"; 48 | $markdown .= "|-----|----------------|------------|-----------------|\n"; 49 | $markdown .= sprintf( 50 | "| %s | Statements | %.2f%% | %d / %d |\n", 51 | getCoverageStatus($statementsPct), 52 | $statementsPct, 53 | $statementsCovered, 54 | $statementsTotal 55 | ); 56 | $markdown .= sprintf( 57 | "| %s | Functions | %.2f%% | %d / %d |\n", 58 | getCoverageStatus($functionsPct), 59 | $functionsPct, 60 | $functionsCovered, 61 | $functionsTotal 62 | ); 63 | 64 | $markdown .= "\n
\n"; 65 | $markdown .= "Files Coverage\n\n"; 66 | $markdown .= "| St. | File | Methods | Statements | Total Coverage |\n"; 67 | $markdown .= "|-----|------|---------|------------|----------------|\n"; 68 | 69 | foreach ($arr['project']['file'] as $file) { 70 | $filePath = 'src/'.explode('src/', $file['@attributes']['name'])[1]; 71 | $fileMetrics = $file['metrics']['@attributes']; 72 | 73 | $methodsPct = $fileMetrics['methods'] > 0 ? ($fileMetrics['coveredmethods'] / $fileMetrics['methods']) * 100 : 0; 74 | $statementsPct = $fileMetrics['statements'] > 0 ? ($fileMetrics['coveredstatements'] / $fileMetrics['statements']) * 100 : 0; 75 | 76 | $fileElements = (int) $fileMetrics['elements']; 77 | $fileCoveredElements = (int) $fileMetrics['coveredelements']; 78 | $totalCoveragePct = $fileElements > 0 ? ($fileCoveredElements / $fileElements) * 100 : 0; 79 | 80 | $markdown .= sprintf( 81 | "| %s | %s | %.2f%% | %.2f%% | %.2f%% |\n", 82 | getCoverageStatus($totalCoveragePct), 83 | $filePath, 84 | $methodsPct, 85 | $statementsPct, 86 | $totalCoveragePct 87 | ); 88 | } 89 | 90 | $markdown .= "\n
\n"; 91 | 92 | file_put_contents($markdownPath.'coverage_report.md', $markdown); 93 | -------------------------------------------------------------------------------- /install_hooks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Make .git_hooks folder as hooks source for git 4 | git config core.hooksPath .git_hooks/ 5 | 6 | # install commitlint and @commitlint/config-conventional globally 7 | npm install -g commitlint @commitlint/config-conventional 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fingerprint-pro-server-api-php-sdk", 3 | "version": "6.6.0", 4 | "private": true, 5 | "devDependencies": { 6 | "@changesets/cli": "^2.27.8", 7 | "@fingerprintjs/changesets-changelog-format": "^0.2.0", 8 | "@fingerprintjs/commit-lint-dx-team": "^0.1.0" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | ./test 10 | 11 | 12 | 13 | 14 | 15 | ./src 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /scripts/functional.sh: -------------------------------------------------------------------------------- 1 | docker container run --env-file .env --rm -v $(pwd):/app/ php:8.1-cli php /app/run_checks.php -------------------------------------------------------------------------------- /scripts/generate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | shopt -s extglob 4 | 5 | VERSION=$(jq -r '.version' package.json) 6 | 7 | while getopts "v:" arg; do 8 | case $arg in 9 | v) 10 | VERSION=$OPTARG 11 | ;; 12 | esac 13 | done 14 | 15 | # jar was downloaded from here https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.34/ 16 | 17 | VERSION=${VERSION//develop/dev} 18 | 19 | if [[ $VERSION =~ ^dev[.-]([0-9]+)[.-]([0-9]+)[.-]([0-9]+)[.-]([0-9]+)$ ]]; then 20 | # Example for the regex above: 21 | # dev.1.0.0.0 22 | # dev-1.0.0-0 23 | # dev.1.0.0-0 24 | # dev-1.0.0.0 25 | VERSION="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.${BASH_REMATCH[3]}-beta.${BASH_REMATCH[4]}" 26 | elif [[ $VERSION =~ ^([0-9]+)[.-]([0-9]+)[.-]([0-9]+)[.-]dev[.-]([0-9]+)$ ]]; then 27 | # Example for the regex above: 28 | # 1.0.0.dev.0 29 | # 1.0.0.dev-0 30 | # 1.0.0-dev-0 31 | # 1.0.0-dev.0 32 | VERSION="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.${BASH_REMATCH[3]}-beta.${BASH_REMATCH[4]}" 33 | elif [[ $VERSION == dev-* ]]; then 34 | _temp_part=${VERSION#dev-} 35 | VERSION="${_temp_part//-/.}-beta" 36 | elif [[ $VERSION == *-dev* ]]; then 37 | _temp_part=${VERSION#*-dev} 38 | _temp_part=${_temp_part//-/.} 39 | VERSION="${VERSION%%-dev*}-beta$_temp_part" 40 | fi 41 | 42 | echo "VERSION: $VERSION" 43 | 44 | # Platform check 45 | platform=$(uname) 46 | ( 47 | # Model file fix 48 | if [ "$platform" = "Darwin" ]; then 49 | sed -i '' "s/\"artifactVersion\": \".*\"/\"artifactVersion\": \"$VERSION\"/g" config.json 50 | else 51 | sed -i "s/\"artifactVersion\": \".*\"/\"artifactVersion\": \"$VERSION\"/g" config.json 52 | fi 53 | ) 54 | 55 | # clean models before generating 56 | rm -f ./src/Model/* 57 | 58 | java -jar ./bin/swagger-codegen-cli.jar generate -t ./template -l php -i ./res/fingerprint-server-api.yaml -o ./ -c config.json --type-mapping RawDeviceAttributes=array,WebhookRawDeviceAttributes=array,Tag=array,GeolocationSubdivisions=array 59 | 60 | if [ ! -f .php-cs-fixer.php ]; then 61 | echo ".php-cs-fixer.php configuration file not found!" 62 | exit 1 63 | fi 64 | 65 | echo "Using .php-cs-fixer.php configuration:" 66 | cat .php-cs-fixer.php 67 | 68 | docker run --rm -v $(pwd):/code ghcr.io/php-cs-fixer/php-cs-fixer:3.64-php8.3 fix --config=/code/.php-cs-fixer.php 69 | 70 | # fix invalid code generated for Models and docs 71 | ( 72 | # Model and docs files fix 73 | if [ "$platform" = "Darwin" ]; then 74 | sed -i '' 's/\\Fingerprint\\ServerAPI\\Model\\array/array/' ./src/Model/* 75 | sed -i '' 's/\\Fingerprint\\ServerAPI\\Model\\mixed/mixed/' ./src/Model/* 76 | sed -i '' 's/?mixed/mixed/' ./src/Model/* 77 | sed -i '' 's/\[\*\*\\Fingerprint\\ServerAPI\\Model\\array\*\*\](array\.md)/array/' ./src/docs/Model/* 78 | sed -i '' 's/\[\*\*\\Fingerprint\\ServerAPI\\Model\\mixed\*\*\](mixed\.md)/mixed/' ./src/docs/Model/* 79 | 80 | else 81 | sed -i 's/\\Fingerprint\\ServerAPI\\Model\\array/array/' ./src/Model/* 82 | sed -i 's/\\Fingerprint\\ServerAPI\\Model\\mixed/mixed/' ./src/Model/* 83 | sed -i 's/?mixed/mixed/' ./src/Model/* 84 | sed -i 's/\[\*\*\\Fingerprint\\ServerAPI\\Model\\array\*\*\](array\.md)/array/' ./src/docs/Model/* 85 | sed -i 's/\[\*\*\\Fingerprint\\ServerAPI\\Model\\mixed\*\*\](mixed\.md)/mixed/' ./src/docs/Model/* 86 | fi 87 | ) 88 | 89 | # cleanup replaced models from readme 90 | ( 91 | patterns=( 92 | '\[RawDeviceAttribute\](docs\/Model\/RawDeviceAttribute\.md)' 93 | '\[RawDeviceAttributeError\](docs\/Model\/RawDeviceAttributeError\.md)' 94 | '\[RawDeviceAttributes\](docs\/Model\/RawDeviceAttributes\.md)' 95 | '\[WebhookRawDeviceAttributes\](docs\/Model\/WebhookRawDeviceAttributes\.md)' 96 | '\[Tag\](docs\/Model\/Tag\.md)' 97 | '\[GeolocationSubdivisions\](docs\/Model\/GeolocationSubdivisions\.md)' 98 | '\[GeolocationSubdivision\](docs\/Model\/GeolocationSubdivision\.md)' 99 | ) 100 | if [ "$platform" = "Darwin" ]; then 101 | for pattern in "${patterns[@]}"; do 102 | sed -i '' "/$pattern/d" src/README.md 103 | done 104 | else 105 | for pattern in "${patterns[@]}"; do 106 | sed -i "/$pattern/d" src/README.md 107 | done 108 | fi 109 | ) 110 | 111 | mv -f src/README.md ./README.md 112 | mv -f src/composer.json composer.json 113 | rm ./docs/Api/* 114 | rm ./docs/Model/* 115 | mv -f src/docs/* ./docs 116 | -------------------------------------------------------------------------------- /scripts/install.sh: -------------------------------------------------------------------------------- 1 | docker-compose run composer install --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist -------------------------------------------------------------------------------- /scripts/sync.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | curl -o ./res/fingerprint-server-api.yaml https://fingerprintjs.github.io/fingerprint-pro-server-api-openapi/schemas/fingerprint-server-api-compact.yaml 4 | 5 | examplesList=( 6 | 'get_visits_200_limit_1.json' 7 | 'get_visits_200_limit_500.json' 8 | 'get_visits_403_error.json' 9 | 'get_visits_429_too_many_requests_error.json' 10 | 'webhook.json' 11 | 'get_event_200.json' 12 | 'get_event_200_all_errors.json' 13 | 'get_event_200_extra_fields.json' 14 | 'get_event_403_error.json' 15 | 'get_event_404_error.json' 16 | 'get_event_200_botd_failed_error.json' 17 | 'get_event_200_botd_too_many_requests_error.json' 18 | 'get_event_200_identification_failed_error.json' 19 | 'get_event_200_identification_too_many_requests_error.json' 20 | 'update_event_400_error.json' 21 | 'update_event_403_error.json' 22 | 'update_event_404_error.json' 23 | 'update_event_409_error.json' 24 | ) 25 | 26 | sharedExamplesList=( 27 | '400_error_empty_visitor_id.json' 28 | '400_error_incorrect_visitor_id.json' 29 | '403_error_feature_not_enabled.json' 30 | '403_error_token_not_found.json' 31 | '403_error_token_required.json' 32 | '403_error_wrong_region.json' 33 | '404_error_visitor_not_found.json' 34 | '429_error_too_many_requests.json' 35 | ) 36 | 37 | for example in ${examplesList[*]}; do 38 | curl -o ./test/mocks/"$example" https://fingerprintjs.github.io/fingerprint-pro-server-api-openapi/examples/"$example" 39 | done 40 | 41 | for example in ${sharedExamplesList[*]}; do 42 | curl -o ./test/mocks/"$example" https://fingerprintjs.github.io/fingerprint-pro-server-api-openapi/examples/shared/"$example" 43 | done 44 | 45 | sed -i '' '/IpInfoResult:/,/IpBlockListResult:/ { /dataCenter:/ { N; d; }; }' ./res/fingerprint-server-api.yaml 46 | 47 | ./scripts/generate.sh 48 | -------------------------------------------------------------------------------- /scripts/test.sh: -------------------------------------------------------------------------------- 1 | docker-compose run phpunit -------------------------------------------------------------------------------- /sealed_results_example.php: -------------------------------------------------------------------------------- 1 | safeLoad(); 11 | 12 | $sealed_result = base64_decode($_ENV['BASE64_SEALED_RESULT'] ?? getenv('BASE64_SEALED_RESULT') ?? ''); 13 | $sealed_key = base64_decode($_ENV['BASE64_KEY'] ?? getenv('BASE64_KEY') ?? ''); 14 | 15 | // Temporarily suppress a million deprecated ArrayAccess return type warnings for readability 16 | // Our SDK generator does not yet support PHP's new attributes system 17 | // https://github.com/swagger-api/swagger-codegen/issues/11820 18 | error_reporting(error_reporting() & ~E_DEPRECATED); 19 | 20 | try { 21 | $data = Sealed::unsealEventResponse($sealed_result, [new DecryptionKey($sealed_key, DecryptionAlgorithm::AES_256_GCM)]); 22 | 23 | fwrite(STDOUT, sprintf("Unsealed event: %s \n", $data)); 24 | } catch (Exception $e) { 25 | fwrite(STDERR, sprintf("Exception when unsealing event: %s\n", $e->getMessage())); 26 | 27 | exit(1); 28 | } 29 | 30 | // Enable the deprecated ArrayAccess return type warning again if needed 31 | error_reporting(error_reporting() | E_DEPRECATED); 32 | 33 | fwrite(STDOUT, "Checks passed\n"); 34 | 35 | exit(0); 36 | -------------------------------------------------------------------------------- /src/ApiException.php: -------------------------------------------------------------------------------- 1 | responseObject = $obj; 60 | } 61 | 62 | public function getResponseObject(): ResponseInterface 63 | { 64 | return $this->responseObject; 65 | } 66 | 67 | public function getErrorDetails(): ModelInterface 68 | { 69 | return $this->errorDetails; 70 | } 71 | 72 | public function setErrorDetails(ModelInterface $errorDetails): void 73 | { 74 | $this->errorDetails = $errorDetails; 75 | } 76 | 77 | public function getRetryAfter(): ?int 78 | { 79 | return $this->retryAfter; 80 | } 81 | 82 | public function setRetryAfter(?int $retryAfter): void 83 | { 84 | $this->retryAfter = $retryAfter; 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /src/Model/BotdBotResult.php: -------------------------------------------------------------------------------- 1 | 'bool']; 56 | 57 | /** 58 | * Array of property to format mappings. Used for (de)serialization. 59 | * 60 | * @var string[] 61 | */ 62 | protected static array $swaggerFormats = [ 63 | 'result' => null]; 64 | 65 | /** 66 | * Array of attributes where the key is the local name, 67 | * and the value is the original name. 68 | * 69 | * @var string[] 70 | */ 71 | protected static array $attributeMap = [ 72 | 'result' => 'result']; 73 | 74 | /** 75 | * Array of attributes to setter functions (for deserialization of responses). 76 | * 77 | * @var string[] 78 | */ 79 | protected static array $setters = [ 80 | 'result' => 'setResult']; 81 | 82 | /** 83 | * Array of attributes to getter functions (for serialization of requests). 84 | * 85 | * @var string[] 86 | */ 87 | protected static array $getters = [ 88 | 'result' => 'getResult']; 89 | 90 | /** 91 | * Associative array for storing property values. 92 | * 93 | * @var mixed[] 94 | */ 95 | protected array $container = []; 96 | 97 | /** 98 | * Constructor. 99 | * 100 | * @param mixed[] $data Associated array of property values 101 | * initializing the model 102 | */ 103 | public function __construct(?array $data = null) 104 | { 105 | $this->container['result'] = isset($data['result']) ? $data['result'] : null; 106 | } 107 | 108 | /** 109 | * Gets the string presentation of the object. 110 | * 111 | */ 112 | public function __toString(): string 113 | { 114 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); 115 | } 116 | 117 | /** 118 | * Array of property to type mappings. Used for (de)serialization. 119 | */ 120 | public static function swaggerTypes(): array 121 | { 122 | return self::$swaggerTypes; 123 | } 124 | 125 | /** 126 | * Array of property to format mappings. Used for (de)serialization. 127 | */ 128 | public static function swaggerFormats(): array 129 | { 130 | return self::$swaggerFormats; 131 | } 132 | 133 | /** 134 | * Array of attributes where the key is the local name, 135 | * and the value is the original name. 136 | */ 137 | public static function attributeMap(): array 138 | { 139 | return self::$attributeMap; 140 | } 141 | 142 | /** 143 | * Array of attributes to setter functions (for deserialization of responses). 144 | */ 145 | public static function setters(): array 146 | { 147 | return self::$setters; 148 | } 149 | 150 | /** 151 | * Array of attributes to getter functions (for serialization of requests). 152 | */ 153 | public static function getters(): array 154 | { 155 | return self::$getters; 156 | } 157 | 158 | /** 159 | * The original name of the model. 160 | */ 161 | public function getModelName(): string 162 | { 163 | return self::$swaggerModelName; 164 | } 165 | 166 | /** 167 | * Show all the invalid properties with reasons. 168 | * 169 | * @return array invalid properties with reasons 170 | */ 171 | public function listInvalidProperties(): array 172 | { 173 | return []; 174 | } 175 | 176 | /** 177 | * Validate all the properties in the model 178 | * return true if all passed. 179 | * 180 | * @return bool True if all properties are valid 181 | */ 182 | public function valid(): bool 183 | { 184 | return 0 === count($this->listInvalidProperties()); 185 | } 186 | 187 | /** 188 | * Gets result. 189 | */ 190 | public function getResult(): ?bool 191 | { 192 | return $this->container['result']; 193 | } 194 | 195 | /** 196 | * Sets result. 197 | * 198 | * @param ?bool $result flag indicating whether the request came from a mobile device with location spoofing enabled 199 | * 200 | * @return $this 201 | */ 202 | public function setResult(?bool $result): self 203 | { 204 | $this->container['result'] = $result; 205 | 206 | return $this; 207 | } 208 | 209 | /** 210 | * Returns true if offset exists. False otherwise. 211 | * 212 | * @param int $offset Offset 213 | */ 214 | public function offsetExists($offset): bool 215 | { 216 | return isset($this->container[$offset]); 217 | } 218 | 219 | /** 220 | * Gets offset. 221 | * 222 | * @param int $offset Offset 223 | */ 224 | public function offsetGet($offset): mixed 225 | { 226 | return isset($this->container[$offset]) ? $this->container[$offset] : null; 227 | } 228 | 229 | /** 230 | * Sets value based on offset. 231 | * 232 | * @param int $offset Offset 233 | * @param mixed $value Value to be set 234 | */ 235 | public function offsetSet($offset, mixed $value): void 236 | { 237 | if (is_null($offset)) { 238 | $this->container[] = $value; 239 | } else { 240 | $this->container[$offset] = $value; 241 | } 242 | } 243 | 244 | /** 245 | * Unsets offset. 246 | * 247 | * @param int $offset Offset 248 | */ 249 | public function offsetUnset($offset): void 250 | { 251 | unset($this->container[$offset]); 252 | } 253 | 254 | /** 255 | * Gets the string presentation of the object in a pretty JSON format. 256 | * 257 | */ 258 | public function toPrettyString(): string 259 | { 260 | return json_encode( 261 | ObjectSerializer::sanitizeForSerialization($this), 262 | JSON_PRETTY_PRINT 263 | ); 264 | } 265 | } 266 | -------------------------------------------------------------------------------- /src/Model/WebhookRemoteControl.php: -------------------------------------------------------------------------------- 1 | 'bool']; 56 | 57 | /** 58 | * Array of property to format mappings. Used for (de)serialization. 59 | * 60 | * @var string[] 61 | */ 62 | protected static array $swaggerFormats = [ 63 | 'result' => null]; 64 | 65 | /** 66 | * Array of attributes where the key is the local name, 67 | * and the value is the original name. 68 | * 69 | * @var string[] 70 | */ 71 | protected static array $attributeMap = [ 72 | 'result' => 'result']; 73 | 74 | /** 75 | * Array of attributes to setter functions (for deserialization of responses). 76 | * 77 | * @var string[] 78 | */ 79 | protected static array $setters = [ 80 | 'result' => 'setResult']; 81 | 82 | /** 83 | * Array of attributes to getter functions (for serialization of requests). 84 | * 85 | * @var string[] 86 | */ 87 | protected static array $getters = [ 88 | 'result' => 'getResult']; 89 | 90 | /** 91 | * Associative array for storing property values. 92 | * 93 | * @var mixed[] 94 | */ 95 | protected array $container = []; 96 | 97 | /** 98 | * Constructor. 99 | * 100 | * @param mixed[] $data Associated array of property values 101 | * initializing the model 102 | */ 103 | public function __construct(?array $data = null) 104 | { 105 | $this->container['result'] = isset($data['result']) ? $data['result'] : null; 106 | } 107 | 108 | /** 109 | * Gets the string presentation of the object. 110 | * 111 | */ 112 | public function __toString(): string 113 | { 114 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); 115 | } 116 | 117 | /** 118 | * Array of property to type mappings. Used for (de)serialization. 119 | */ 120 | public static function swaggerTypes(): array 121 | { 122 | return self::$swaggerTypes; 123 | } 124 | 125 | /** 126 | * Array of property to format mappings. Used for (de)serialization. 127 | */ 128 | public static function swaggerFormats(): array 129 | { 130 | return self::$swaggerFormats; 131 | } 132 | 133 | /** 134 | * Array of attributes where the key is the local name, 135 | * and the value is the original name. 136 | */ 137 | public static function attributeMap(): array 138 | { 139 | return self::$attributeMap; 140 | } 141 | 142 | /** 143 | * Array of attributes to setter functions (for deserialization of responses). 144 | */ 145 | public static function setters(): array 146 | { 147 | return self::$setters; 148 | } 149 | 150 | /** 151 | * Array of attributes to getter functions (for serialization of requests). 152 | */ 153 | public static function getters(): array 154 | { 155 | return self::$getters; 156 | } 157 | 158 | /** 159 | * The original name of the model. 160 | */ 161 | public function getModelName(): string 162 | { 163 | return self::$swaggerModelName; 164 | } 165 | 166 | /** 167 | * Show all the invalid properties with reasons. 168 | * 169 | * @return array invalid properties with reasons 170 | */ 171 | public function listInvalidProperties(): array 172 | { 173 | return []; 174 | } 175 | 176 | /** 177 | * Validate all the properties in the model 178 | * return true if all passed. 179 | * 180 | * @return bool True if all properties are valid 181 | */ 182 | public function valid(): bool 183 | { 184 | return 0 === count($this->listInvalidProperties()); 185 | } 186 | 187 | /** 188 | * Gets result. 189 | */ 190 | public function getResult(): ?bool 191 | { 192 | return $this->container['result']; 193 | } 194 | 195 | /** 196 | * Sets result. 197 | * 198 | * @param ?bool $result `true` if the request came from a machine being remotely controlled (e.g. TeamViewer), `false` otherwise. 199 | * 200 | * @return $this 201 | */ 202 | public function setResult(?bool $result): self 203 | { 204 | $this->container['result'] = $result; 205 | 206 | return $this; 207 | } 208 | 209 | /** 210 | * Returns true if offset exists. False otherwise. 211 | * 212 | * @param int $offset Offset 213 | */ 214 | public function offsetExists($offset): bool 215 | { 216 | return isset($this->container[$offset]); 217 | } 218 | 219 | /** 220 | * Gets offset. 221 | * 222 | * @param int $offset Offset 223 | */ 224 | public function offsetGet($offset): mixed 225 | { 226 | return isset($this->container[$offset]) ? $this->container[$offset] : null; 227 | } 228 | 229 | /** 230 | * Sets value based on offset. 231 | * 232 | * @param int $offset Offset 233 | * @param mixed $value Value to be set 234 | */ 235 | public function offsetSet($offset, mixed $value): void 236 | { 237 | if (is_null($offset)) { 238 | $this->container[] = $value; 239 | } else { 240 | $this->container[$offset] = $value; 241 | } 242 | } 243 | 244 | /** 245 | * Unsets offset. 246 | * 247 | * @param int $offset Offset 248 | */ 249 | public function offsetUnset($offset): void 250 | { 251 | unset($this->container[$offset]); 252 | } 253 | 254 | /** 255 | * Gets the string presentation of the object in a pretty JSON format. 256 | * 257 | */ 258 | public function toPrettyString(): string 259 | { 260 | return json_encode( 261 | ObjectSerializer::sanitizeForSerialization($this), 262 | JSON_PRETTY_PRINT 263 | ); 264 | } 265 | } 266 | -------------------------------------------------------------------------------- /src/Model/WebhookTor.php: -------------------------------------------------------------------------------- 1 | 'bool']; 56 | 57 | /** 58 | * Array of property to format mappings. Used for (de)serialization. 59 | * 60 | * @var string[] 61 | */ 62 | protected static array $swaggerFormats = [ 63 | 'result' => null]; 64 | 65 | /** 66 | * Array of attributes where the key is the local name, 67 | * and the value is the original name. 68 | * 69 | * @var string[] 70 | */ 71 | protected static array $attributeMap = [ 72 | 'result' => 'result']; 73 | 74 | /** 75 | * Array of attributes to setter functions (for deserialization of responses). 76 | * 77 | * @var string[] 78 | */ 79 | protected static array $setters = [ 80 | 'result' => 'setResult']; 81 | 82 | /** 83 | * Array of attributes to getter functions (for serialization of requests). 84 | * 85 | * @var string[] 86 | */ 87 | protected static array $getters = [ 88 | 'result' => 'getResult']; 89 | 90 | /** 91 | * Associative array for storing property values. 92 | * 93 | * @var mixed[] 94 | */ 95 | protected array $container = []; 96 | 97 | /** 98 | * Constructor. 99 | * 100 | * @param mixed[] $data Associated array of property values 101 | * initializing the model 102 | */ 103 | public function __construct(?array $data = null) 104 | { 105 | $this->container['result'] = isset($data['result']) ? $data['result'] : null; 106 | } 107 | 108 | /** 109 | * Gets the string presentation of the object. 110 | * 111 | */ 112 | public function __toString(): string 113 | { 114 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); 115 | } 116 | 117 | /** 118 | * Array of property to type mappings. Used for (de)serialization. 119 | */ 120 | public static function swaggerTypes(): array 121 | { 122 | return self::$swaggerTypes; 123 | } 124 | 125 | /** 126 | * Array of property to format mappings. Used for (de)serialization. 127 | */ 128 | public static function swaggerFormats(): array 129 | { 130 | return self::$swaggerFormats; 131 | } 132 | 133 | /** 134 | * Array of attributes where the key is the local name, 135 | * and the value is the original name. 136 | */ 137 | public static function attributeMap(): array 138 | { 139 | return self::$attributeMap; 140 | } 141 | 142 | /** 143 | * Array of attributes to setter functions (for deserialization of responses). 144 | */ 145 | public static function setters(): array 146 | { 147 | return self::$setters; 148 | } 149 | 150 | /** 151 | * Array of attributes to getter functions (for serialization of requests). 152 | */ 153 | public static function getters(): array 154 | { 155 | return self::$getters; 156 | } 157 | 158 | /** 159 | * The original name of the model. 160 | */ 161 | public function getModelName(): string 162 | { 163 | return self::$swaggerModelName; 164 | } 165 | 166 | /** 167 | * Show all the invalid properties with reasons. 168 | * 169 | * @return array invalid properties with reasons 170 | */ 171 | public function listInvalidProperties(): array 172 | { 173 | return []; 174 | } 175 | 176 | /** 177 | * Validate all the properties in the model 178 | * return true if all passed. 179 | * 180 | * @return bool True if all properties are valid 181 | */ 182 | public function valid(): bool 183 | { 184 | return 0 === count($this->listInvalidProperties()); 185 | } 186 | 187 | /** 188 | * Gets result. 189 | */ 190 | public function getResult(): ?bool 191 | { 192 | return $this->container['result']; 193 | } 194 | 195 | /** 196 | * Sets result. 197 | * 198 | * @param ?bool $result `true` if the request IP address is a known tor exit node, `false` otherwise 199 | * 200 | * @return $this 201 | */ 202 | public function setResult(?bool $result): self 203 | { 204 | $this->container['result'] = $result; 205 | 206 | return $this; 207 | } 208 | 209 | /** 210 | * Returns true if offset exists. False otherwise. 211 | * 212 | * @param int $offset Offset 213 | */ 214 | public function offsetExists($offset): bool 215 | { 216 | return isset($this->container[$offset]); 217 | } 218 | 219 | /** 220 | * Gets offset. 221 | * 222 | * @param int $offset Offset 223 | */ 224 | public function offsetGet($offset): mixed 225 | { 226 | return isset($this->container[$offset]) ? $this->container[$offset] : null; 227 | } 228 | 229 | /** 230 | * Sets value based on offset. 231 | * 232 | * @param int $offset Offset 233 | * @param mixed $value Value to be set 234 | */ 235 | public function offsetSet($offset, mixed $value): void 236 | { 237 | if (is_null($offset)) { 238 | $this->container[] = $value; 239 | } else { 240 | $this->container[$offset] = $value; 241 | } 242 | } 243 | 244 | /** 245 | * Unsets offset. 246 | * 247 | * @param int $offset Offset 248 | */ 249 | public function offsetUnset($offset): void 250 | { 251 | unset($this->container[$offset]); 252 | } 253 | 254 | /** 255 | * Gets the string presentation of the object in a pretty JSON format. 256 | * 257 | */ 258 | public function toPrettyString(): string 259 | { 260 | return json_encode( 261 | ObjectSerializer::sanitizeForSerialization($this), 262 | JSON_PRETTY_PRINT 263 | ); 264 | } 265 | } 266 | -------------------------------------------------------------------------------- /src/Sealed/DecompressionException.php: -------------------------------------------------------------------------------- 1 | key = $key; 13 | $this->algorithm = $algorithm; 14 | } 15 | 16 | public function getKey() 17 | { 18 | return $this->key; 19 | } 20 | 21 | public function getAlgorithm() 22 | { 23 | return $this->algorithm; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Sealed/InvalidSealedDataException.php: -------------------------------------------------------------------------------- 1 | getAlgorithm()) { 55 | case DecryptionAlgorithm::AES_256_GCM: 56 | try { 57 | $data = substr($sealed, strlen(self::$SEAL_HEADER)); 58 | 59 | return self::decryptAes256Gcm($data, $key->getKey()); 60 | } catch (\Exception $exception) { 61 | $aggregateException->addException(new UnsealException( 62 | 'Failed to decrypt', 63 | $exception, 64 | $key 65 | )); 66 | } 67 | 68 | break; 69 | 70 | default: 71 | throw new \InvalidArgumentException('Invalid decryption algorithm'); 72 | } 73 | } 74 | 75 | throw $aggregateException; 76 | } 77 | 78 | /** 79 | * @param mixed $sealedData 80 | * @param mixed $decryptionKey 81 | * 82 | * @throws \Exception 83 | */ 84 | private static function decryptAes256Gcm($sealedData, $decryptionKey): string 85 | { 86 | $nonce = substr($sealedData, 0, self::NONCE_LENGTH); 87 | $ciphertext = substr($sealedData, self::NONCE_LENGTH); 88 | 89 | $tag = substr($ciphertext, -self::AUTH_TAG_LENGTH); 90 | $ciphertext = substr($ciphertext, 0, -self::AUTH_TAG_LENGTH); 91 | 92 | $decryptedData = openssl_decrypt($ciphertext, 'aes-256-gcm', $decryptionKey, OPENSSL_RAW_DATA, $nonce, $tag); 93 | 94 | if (false === $decryptedData) { 95 | throw new \Exception('Decryption failed'); 96 | } 97 | 98 | return self::decompress($decryptedData); 99 | } 100 | 101 | /** 102 | * @param mixed $data 103 | * 104 | * @throws \Exception 105 | */ 106 | private static function decompress($data): string 107 | { 108 | if (false === $data || 0 === strlen($data)) { 109 | throw new DecompressionException(); 110 | } 111 | $inflated = @gzinflate($data); // Ignore warnings, because we check the decompressed data's validity and throw error if necessary 112 | 113 | if (false === $inflated) { 114 | throw new DecompressionException(); 115 | } 116 | 117 | return $inflated; 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /src/Sealed/UnsealAggregateException.php: -------------------------------------------------------------------------------- 1 | exceptions[] = $exception; 20 | } 21 | 22 | public function getExceptions() 23 | { 24 | return $this->exceptions; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Sealed/UnsealException.php: -------------------------------------------------------------------------------- 1 | decryptionKeyDescription = $decryptionKey; 13 | } 14 | 15 | public function __toString() 16 | { 17 | return 'UnsealException{'. 18 | 'decryptionKey='.$this->decryptionKeyDescription. 19 | ', message='.$this->getMessage(). 20 | ', cause='.$this->getPrevious(). 21 | '}'; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/SerializationException.php: -------------------------------------------------------------------------------- 1 | getCode() : 0, $prev); 14 | $this->response = $response; 15 | } 16 | 17 | public function setResponse(ResponseInterface $response): void 18 | { 19 | $this->response = $response; 20 | } 21 | 22 | public function getResponse(): ?ResponseInterface 23 | { 24 | return $this->response; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Webhook/WebhookVerifier.php: -------------------------------------------------------------------------------- 1 | partial_header}} 13 | /** 14 | * NOTE: This class is auto generated by the swagger code generator program. 15 | * https://github.com/swagger-api/swagger-codegen 16 | * Do not edit the class manually. 17 | */ 18 | 19 | namespace {{invokerPackage}}; 20 | 21 | use \Exception; 22 | use Fingerprint\ServerAPI\Model\ModelInterface; 23 | use Psr\Http\Message\ResponseInterface; 24 | 25 | /** 26 | * ApiException Class Doc Comment 27 | * 28 | * @category Class 29 | * @package {{invokerPackage}} 30 | * @author Swagger Codegen team 31 | * @link https://github.com/swagger-api/swagger-codegen 32 | */ 33 | class ApiException extends Exception 34 | { 35 | protected ResponseInterface $responseObject; 36 | protected ?ModelInterface $errorDetails = null; 37 | protected ?int $retryAfter = null; 38 | 39 | public function __construct(?string $message = "", ?int $code = 0) 40 | { 41 | parent::__construct($message, $code); 42 | } 43 | 44 | 45 | /** 46 | * Sets the deseralized response object (during deserialization) 47 | */ 48 | public function setResponseObject(ResponseInterface $obj): void 49 | { 50 | $this->responseObject = $obj; 51 | } 52 | 53 | public function getResponseObject(): ResponseInterface 54 | { 55 | return $this->responseObject; 56 | } 57 | 58 | public function getErrorDetails(): ModelInterface 59 | { 60 | return $this->errorDetails; 61 | } 62 | 63 | public function setErrorDetails(ModelInterface $errorDetails): void 64 | { 65 | $this->errorDetails = $errorDetails; 66 | } 67 | 68 | public function getRetryAfter(): ?int 69 | { 70 | return $this->retryAfter; 71 | } 72 | 73 | public function setRetryAfter(?int $retryAfter): void 74 | { 75 | $this->retryAfter = $retryAfter; 76 | } 77 | } -------------------------------------------------------------------------------- /template/api_doc.mustache: -------------------------------------------------------------------------------- 1 | # {{invokerPackage}}\FingerprintApi{{#description}} 2 | {{description}}{{/description}} 3 | 4 | All URIs are relative to *{{basePath}}* 5 | 6 | Method | HTTP request | Description 7 | ------------- | ------------- | ------------- 8 | {{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} 9 | {{/operation}}{{/operations}} 10 | 11 | {{#operations}} 12 | {{#operation}} 13 | # **{{{operationId}}}** 14 | > {{#returnType}} [ {{{returnType}}}, \Psr\Http\Message\ResponseInterface ] {{/returnType}}{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) 15 | 16 | {{{summary}}}{{#notes}} 17 | 18 | {{{notes}}}{{/notes}} 19 | 20 | ### Example 21 | ```php 22 | {{{operationId}}}({{#allParams}}{{^required}}{{paramName}}: {{/required}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} 45 | echo "
" . $httpResponse->getBody()->getContents() . "
";{{/returnType}} 46 | } catch (Exception $e) { 47 | echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL; 48 | } 49 | ?> 50 | ``` 51 | 52 | ### Parameters 53 | {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#@last}} 54 | Name | Type | Description | Notes 55 | ------------- | ------------- | ------------- | -------------{{/@last}}{{/allParams}} 56 | {{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**](../Model/{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{{description}}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}} 57 | {{/allParams}} 58 | 59 | ### Return type 60 | 61 | Array: 62 | 0. {{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**](../Model/{{returnBaseType}}.md) | null{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}null{{/returnType}}, 63 | 1. \Psr\Http\Message\ResponseInterface 64 | 65 | 66 | ### Authorization 67 | 68 | {{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../../README.md#{{{name}}}){{^@last}}, {{/@last}}{{/authMethods}} 69 | 70 | ### HTTP request headers 71 | 72 | - **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} 73 | - **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} 74 | 75 | [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) 76 | 77 | {{/operation}} 78 | {{/operations}} 79 | -------------------------------------------------------------------------------- /template/composer.mustache: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{composerVendorName}}/{{composerProjectName}}", 3 | {{#artifactVersion}} 4 | "version": "{{artifactVersion}}", 5 | {{/artifactVersion}} 6 | "description": "Fingerprint Server API provides a way for validating visitors’ data issued by Fingerprint Pro.", 7 | "keywords": [ 8 | "swagger", 9 | "php", 10 | "sdk", 11 | "api", 12 | "browser", 13 | "detection", 14 | "fingerprint", 15 | "identification", 16 | "fingerprinting", 17 | "browser-fingerprinting", 18 | "browser-fingerprint", 19 | "fraud-detection", 20 | "fraud", 21 | "audio-fingerprinting", 22 | "fingerprintjs", 23 | "visitor-identification", 24 | "fingerprintjs-pro" 25 | ], 26 | "homepage": "https://www.fingerprint.com", 27 | "license": "MIT", 28 | "authors": [ 29 | { 30 | "name": "{{composerVendorName}}", 31 | "homepage": "{{gitRepoBaseURL}}/{{gitUserId}}/{{gitRepoId}}" 32 | } 33 | ], 34 | "require": { 35 | "php": ">=8.1", 36 | "ext-curl": "*", 37 | "ext-json": "*", 38 | "ext-mbstring": "*", 39 | "guzzlehttp/guzzle": "~7.2", 40 | "ext-zlib": "*", 41 | "ext-openssl": "*" 42 | }, 43 | "require-dev": { 44 | "phpunit/phpunit": "^11.5", 45 | "vlucas/phpdotenv": "^5.6" 46 | }, 47 | "autoload": { 48 | "psr-4": { "{{escapedInvokerPackage}}\\" : "{{srcBasePath}}/src" } 49 | }, 50 | "autoload-dev": { 51 | "psr-4": { "{{escapedInvokerPackage}}\\" : "{{testBasePath}}/" } 52 | } 53 | } -------------------------------------------------------------------------------- /template/model.mustache: -------------------------------------------------------------------------------- 1 | partial_header}} 13 | /** 14 | * NOTE: This class is auto generated by the swagger code generator program. 15 | * https://github.com/swagger-api/swagger-codegen 16 | * Do not edit the class manually. 17 | */ 18 | 19 | namespace {{modelPackage}}; 20 | {{^isEnum}} 21 | {{^parentSchema}} 22 | 23 | use \ArrayAccess; 24 | {{/parentSchema}} 25 | {{/isEnum}} 26 | use {{backSlash}}{{invokerPackage}}\ObjectSerializer; 27 | 28 | /** 29 | * {{classname}} Class Doc Comment 30 | * 31 | * @category Class 32 | {{#description}} 33 | * @description {{{description}}} 34 | {{/description}} 35 | * @package {{invokerPackage}} 36 | * @author Swagger Codegen team 37 | * @link https://github.com/swagger-api/swagger-codegen 38 | */ 39 | {{#isEnum}}{{>model_enum}}{{/isEnum}}{{^isEnum}}{{>model_generic}}{{/isEnum}} 40 | {{/model}}{{/models}} 41 | -------------------------------------------------------------------------------- /template/model_doc.mustache: -------------------------------------------------------------------------------- 1 | {{#models}}{{#model}}# {{classname}} 2 | {{#unescapedDescription}} 3 | {{{.}}} 4 | 5 | {{/unescapedDescription}} 6 | {{^emptyVars}} 7 | 8 | ## Properties 9 | Name | Type | Description | Notes 10 | ------------ | ------------- | ------------- | ------------- 11 | {{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{{description}}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} 12 | {{/vars}} 13 | 14 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 15 | 16 | {{/emptyVars}}{{/model}}{{/models}} 17 | -------------------------------------------------------------------------------- /template/model_enum.mustache: -------------------------------------------------------------------------------- 1 | enum {{classname}}: string 2 | { 3 | {{#allowableValues}}{{#enumVars}}case {{{name}}} = {{{value}}}; 4 | {{/enumVars}}{{/allowableValues}} 5 | } 6 | -------------------------------------------------------------------------------- /test/ObjectSerializerTest.php: -------------------------------------------------------------------------------- 1 | 'Automation Test Scenario 1', 17 | 'automationTest_testId' => 'test_'.substr(bin2hex(random_bytes(4)), 0, 6), 18 | 'automationTest_metadata' => [ 19 | 'id' => rand(1, 1000), 20 | 'description' => 'This is a metadata description for automation testing.', 21 | 'createdAt' => (new DateTime())->format(DateTime::ATOM), 22 | 'updatedAt' => (new DateTime())->format(DateTime::ATOM), 23 | ], 24 | 'automationTest_settings' => [ 25 | 'retries' => 3, 26 | 'timeout' => 5000, 27 | 'environment' => 'staging', 28 | 'notifications' => ['email', 'slack', 'sms'], 29 | ], 30 | 'automationTest_users' => [ 31 | ['userId' => '123', 'roles' => ['admin', 'editor'], 'isActive' => true], 32 | ['userId' => '456', 'roles' => ['viewer'], 'isActive' => false], 33 | ], 34 | 'automationTest_metrics' => [ 35 | ['name' => 'executionTime', 'value' => 120.5, 'unit' => 'seconds'], 36 | ['name' => 'memoryUsage', 'value' => 256, 'unit' => 'MB'], 37 | ['name' => 'assertionsPassed', 'value' => 100], 38 | ], 39 | 'automationTest_logs' => [ 40 | [ 41 | 'timestamp' => (new DateTime())->format(DateTime::ATOM), 42 | 'level' => 'info', 43 | 'message' => 'Test started.', 44 | ], 45 | [ 46 | 'timestamp' => (new DateTime())->format(DateTime::ATOM), 47 | 'level' => 'error', 48 | 'message' => 'Assertion failed.', 49 | ], 50 | ], 51 | ]; 52 | 53 | $body = new EventsUpdateRequest(); 54 | $body->setTag($tag); 55 | 56 | $sanitized_body = ObjectSerializer::sanitizeForSerialization($body); 57 | $this->assertSame($sanitized_body->tag, $tag); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /test/WebhookVerifierTest.php: -------------------------------------------------------------------------------- 1 | data, $this->secret); 17 | $this->assertTrue($result, 'With valid signature'); 18 | } 19 | 20 | public function testWithInvalidHeader() 21 | { 22 | $result = WebhookVerifier::IsValidWebhookSignature('v2=invalid', $this->data, $this->secret); 23 | $this->assertFalse($result, 'With invalid header'); 24 | } 25 | 26 | public function testWithHeaderWithoutVersion() 27 | { 28 | $result = WebhookVerifier::IsValidWebhookSignature('invalid', $this->data, $this->secret); 29 | $this->assertFalse($result, 'With header without version'); 30 | } 31 | 32 | public function testWithEmptyHeader() 33 | { 34 | $result = WebhookVerifier::IsValidWebhookSignature('', $this->data, $this->secret); 35 | $this->assertFalse($result, 'With empty header'); 36 | } 37 | 38 | public function testWithEmptySecret() 39 | { 40 | $validHeader = 'v1=1b2c16b75bd2a870c114153ccda5bcfca63314bc722fa160d690de133ccbb9db'; 41 | $result = WebhookVerifier::IsValidWebhookSignature($validHeader, $this->data, ''); 42 | $this->assertFalse($result, 'With empty secret'); 43 | } 44 | 45 | public function testWithEmptyData() 46 | { 47 | $validHeader = 'v1=1b2c16b75bd2a870c114153ccda5bcfca63314bc722fa160d690de133ccbb9db'; 48 | $result = WebhookVerifier::IsValidWebhookSignature($validHeader, '', $this->secret); 49 | $this->assertFalse($result, 'With empty data'); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /test/mocks/errors/400_bot_type_invalid.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "RequestCannotBeParsed", 4 | "message": "invalid bot type" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/mocks/errors/400_end_time_invalid.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "RequestCannotBeParsed", 4 | "message": "invalid end time" 5 | } 6 | } -------------------------------------------------------------------------------- /test/mocks/errors/400_ip_address_invalid.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "RequestCannotBeParsed", 4 | "message": "invalid ip address" 5 | } 6 | } -------------------------------------------------------------------------------- /test/mocks/errors/400_limit_invalid.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "RequestCannotBeParsed", 4 | "message": "invalid limit" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/mocks/errors/400_linked_id_invalid.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "RequestCannotBeParsed", 4 | "message": "linked_id can't be greater than 256 characters long" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/mocks/errors/400_pagination_key_invalid.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "RequestCannotBeParsed", 4 | "message": "invalid pagination key" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/mocks/errors/400_request_body_invalid.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "RequestCannotBeParsed", 4 | "message": "request body is not valid" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/mocks/errors/400_reverse_invalid.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "RequestCannotBeParsed", 4 | "message": "invalid reverse param" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/mocks/errors/400_start_time_invalid.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "RequestCannotBeParsed", 4 | "message": "invalid start time" 5 | } 6 | } -------------------------------------------------------------------------------- /test/mocks/errors/400_visitor_id_invalid.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "RequestCannotBeParsed", 4 | "message": "invalid visitor id" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/mocks/errors/400_visitor_id_required.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "RequestCannotBeParsed", 4 | "message": "visitor id is required" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/mocks/errors/403_feature_not_enabled.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "FeatureNotEnabled", 4 | "message": "feature not enabled" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/mocks/errors/403_subscription_not_active.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "SubscriptionNotActive", 4 | "message": "forbidden" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/mocks/errors/403_token_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "TokenNotFound", 4 | "message": "secret key is not found" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/mocks/errors/403_token_required.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "TokenRequired", 4 | "message": "secret key is required" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/mocks/errors/403_wrong_region.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "WrongRegion", 4 | "message": "wrong region" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/mocks/errors/404_request_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "RequestNotFound", 4 | "message": "request id is not found" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/mocks/errors/404_visitor_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "VisitorNotFound", 4 | "message": "visitor not found" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/mocks/errors/409_state_not_ready.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "StateNotReady", 4 | "message": "resource is not mutable yet, try again" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/mocks/errors/429_too_many_requests.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "TooManyRequests", 4 | "message": "too many requests" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/mocks/get_event_200_all_errors.json: -------------------------------------------------------------------------------- 1 | { 2 | "products": { 3 | "identification": { 4 | "error": { 5 | "code": "Failed", 6 | "message": "internal server error" 7 | } 8 | }, 9 | "botd": { 10 | "error": { 11 | "code": "Failed", 12 | "message": "internal server error" 13 | } 14 | }, 15 | "ipInfo": { 16 | "error": { 17 | "code": "Failed", 18 | "message": "internal server error" 19 | } 20 | }, 21 | "incognito": { 22 | "error": { 23 | "code": "Failed", 24 | "message": "internal server error" 25 | } 26 | }, 27 | "rootApps": { 28 | "error": { 29 | "code": "Failed", 30 | "message": "internal server error" 31 | } 32 | }, 33 | "clonedApp": { 34 | "error": { 35 | "code": "Failed", 36 | "message": "internal server error" 37 | } 38 | }, 39 | "factoryReset": { 40 | "error": { 41 | "code": "Failed", 42 | "message": "internal server error" 43 | } 44 | }, 45 | "jailbroken": { 46 | "error": { 47 | "code": "Failed", 48 | "message": "internal server error" 49 | } 50 | }, 51 | "frida": { 52 | "error": { 53 | "code": "Failed", 54 | "message": "internal server error" 55 | } 56 | }, 57 | "emulator": { 58 | "error": { 59 | "code": "Failed", 60 | "message": "internal server error" 61 | } 62 | }, 63 | "ipBlocklist": { 64 | "error": { 65 | "code": "Failed", 66 | "message": "internal server error" 67 | } 68 | }, 69 | "tor": { 70 | "error": { 71 | "code": "Failed", 72 | "message": "internal server error" 73 | } 74 | }, 75 | "vpn": { 76 | "error": { 77 | "code": "Failed", 78 | "message": "internal server error" 79 | } 80 | }, 81 | "proxy": { 82 | "error": { 83 | "code": "Failed", 84 | "message": "internal server error" 85 | } 86 | }, 87 | "privacySettings": { 88 | "error": { 89 | "code": "Failed", 90 | "message": "internal server error" 91 | } 92 | }, 93 | "virtualMachine": { 94 | "error": { 95 | "code": "Failed", 96 | "message": "internal server error" 97 | } 98 | }, 99 | "tampering": { 100 | "error": { 101 | "code": "Failed", 102 | "message": "internal server error" 103 | } 104 | }, 105 | "rawDeviceAttributes": { 106 | "data": { 107 | "audio": { 108 | "error": { 109 | "name": "Error", 110 | "message": "internal server error" 111 | } 112 | }, 113 | "canvas": { 114 | "error": { 115 | "name": "Error", 116 | "message": "internal server error" 117 | } 118 | } 119 | } 120 | }, 121 | "locationSpoofing": { 122 | "error": { 123 | "code": "Failed", 124 | "message": "internal server error" 125 | } 126 | }, 127 | "highActivity": { 128 | "error": { 129 | "code": "Failed", 130 | "message": "internal server error" 131 | } 132 | }, 133 | "suspectScore": { 134 | "error": { 135 | "code": "Failed", 136 | "message": "internal server error" 137 | } 138 | }, 139 | "remoteControl": { 140 | "error": { 141 | "code": "Failed", 142 | "message": "internal server error" 143 | } 144 | }, 145 | "velocity": { 146 | "error": { 147 | "code": "Failed", 148 | "message": "internal server error" 149 | } 150 | }, 151 | "developerTools": { 152 | "error": { 153 | "code": "Failed", 154 | "message": "internal server error" 155 | } 156 | }, 157 | "mitmAttack": { 158 | "error": { 159 | "code": "Failed", 160 | "message": "internal server error" 161 | } 162 | } 163 | } 164 | } 165 | -------------------------------------------------------------------------------- /test/mocks/get_event_200_botd_failed_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "products": { 3 | "identification": { 4 | "data": { 5 | "visitorId": "Ibk1527CUFmcnjLwIs4A9", 6 | "requestId": "0KSh65EnVoB85JBmloQK", 7 | "incognito": true, 8 | "linkedId": "somelinkedId", 9 | "time": "2019-05-21T16:40:13Z", 10 | "tag": {}, 11 | "timestamp": 1582299576512, 12 | "url": "https://www.example.com/login", 13 | "ip": "61.127.217.15", 14 | "ipLocation": { 15 | "accuracyRadius": 10, 16 | "latitude": 49.982, 17 | "longitude": 36.2566, 18 | "postalCode": "61202", 19 | "timezone": "Europe/Dusseldorf", 20 | "city": { 21 | "name": "Dusseldorf" 22 | }, 23 | "continent": { 24 | "code": "EU", 25 | "name": "Europe" 26 | }, 27 | "country": { 28 | "code": "DE", 29 | "name": "Germany" 30 | }, 31 | "subdivisions": [ 32 | { 33 | "isoCode": "63", 34 | "name": "North Rhine-Westphalia" 35 | } 36 | ] 37 | }, 38 | "browserDetails": { 39 | "browserName": "Chrome", 40 | "browserMajorVersion": "74", 41 | "browserFullVersion": "74.0.3729", 42 | "os": "Windows", 43 | "osVersion": "7", 44 | "device": "Other", 45 | "userAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) ...." 46 | }, 47 | "confidence": { 48 | "score": 0.97 49 | }, 50 | "visitorFound": true, 51 | "firstSeenAt": { 52 | "global": "2022-03-16T11:26:45.362Z", 53 | "subscription": "2022-03-16T11:31:01.101Z" 54 | }, 55 | "lastSeenAt": { 56 | "global": "2022-03-16T11:28:34.023Z", 57 | "subscription": null 58 | } 59 | } 60 | }, 61 | "botd": { 62 | "error": { 63 | "code": "Failed", 64 | "message": "internal server error" 65 | } 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /test/mocks/get_event_200_extra_fields.json: -------------------------------------------------------------------------------- 1 | { 2 | "products": { 3 | "identification": { 4 | "data": { 5 | "visitorId": "Ibk1527CUFmcnjLwIs4A9", 6 | "requestId": "0KSh65EnVoB85JBmloQK", 7 | "incognito": true, 8 | "linkedId": "somelinkedId", 9 | "tag": {}, 10 | "time": "2019-05-21T16:40:13Z", 11 | "timestamp": 1582299576512, 12 | "url": "https://www.example.com/login", 13 | "ip": "61.127.217.15", 14 | "ipLocation": { 15 | "accuracyRadius": 10, 16 | "latitude": 49.982, 17 | "longitude": 36.2566, 18 | "postalCode": "61202", 19 | "timezone": "Europe/Dusseldorf", 20 | "city": { 21 | "name": "Dusseldorf" 22 | }, 23 | "continent": { 24 | "code": "EU", 25 | "name": "Europe" 26 | }, 27 | "country": { 28 | "code": "DE", 29 | "name": "Germany" 30 | }, 31 | "subdivisions": [ 32 | { 33 | "isoCode": "63", 34 | "name": "North Rhine-Westphalia" 35 | } 36 | ] 37 | }, 38 | "browserDetails": { 39 | "browserName": "Chrome", 40 | "browserMajorVersion": "74", 41 | "browserFullVersion": "74.0.3729", 42 | "os": "Windows", 43 | "osVersion": "7", 44 | "device": "Other", 45 | "userAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) ...." 46 | }, 47 | "confidence": { 48 | "score": 0.97, 49 | "revision": "v1.1" 50 | }, 51 | "visitorFound": true, 52 | "firstSeenAt": { 53 | "global": "2022-03-16T11:26:45.362Z", 54 | "subscription": "2022-03-16T11:31:01.101Z" 55 | }, 56 | "lastSeenAt": { 57 | "global": "2022-03-16T11:28:34.023Z", 58 | "subscription": null 59 | } 60 | } 61 | }, 62 | "botd": { 63 | "data": { 64 | "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 YaBrowser/24.1.0.0 Safari/537.36", 65 | "requestId": "1708102555327.NLOjmg", 66 | "bot": { 67 | "result": "notDetected" 68 | }, 69 | "url": "https://www.example.com/login", 70 | "ip": "61.127.217.15", 71 | "time": "2019-05-21T16:40:13Z" 72 | } 73 | }, 74 | "product3": { 75 | "data": { 76 | "result": false 77 | } 78 | }, 79 | "product4": { 80 | "data": { 81 | "result": true, 82 | "details": { 83 | "detail1": true, 84 | "detail2": "detail description", 85 | "detail3": 42 86 | } 87 | } 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /test/mocks/get_event_200_identification_failed_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "products": { 3 | "identification": { 4 | "error": { 5 | "code": "Failed", 6 | "message": "internal server error" 7 | } 8 | }, 9 | "botd": { 10 | "data": { 11 | "bot": { 12 | "result": "bad", 13 | "type": "headlessChrome" 14 | }, 15 | "url": "https://example.com/login", 16 | "ip": "94.60.143.223", 17 | "time": "2024-02-23T10:20:25.287Z", 18 | "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/121.0.6167.57 Safari/537.36", 19 | "requestId": "1708683625245.tuJ4nD" 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /test/mocks/get_event_200_too_many_requests_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "products": { 3 | "identification": { 4 | "error": { 5 | "code": "429 Too Many Requests", 6 | "message": "too many requests" 7 | } 8 | }, 9 | "botd": { 10 | "error": { 11 | "code": "TooManyRequests", 12 | "message": "too many requests" 13 | } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /test/mocks/get_visitors_200_limit_1.json: -------------------------------------------------------------------------------- 1 | { 2 | "visitorId": "AcxioeQKffpXF8iGQK3P", 3 | "visits": [ 4 | { 5 | "requestId": "1655373953086.DDlfmP", 6 | "browserDetails": { 7 | "browserName": "Chrome", 8 | "browserMajorVersion": "102", 9 | "browserFullVersion": "102.0.5005", 10 | "os": "Mac OS X", 11 | "osVersion": "10.15.7", 12 | "device": "Other", 13 | "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36" 14 | }, 15 | "incognito": false, 16 | "ip": "82.118.30.68", 17 | "ipLocation": { 18 | "accuracyRadius": 1000, 19 | "latitude": 50.0805, 20 | "longitude": 14.467, 21 | "postalCode": "130 00", 22 | "timezone": "Europe/Prague", 23 | "city": { 24 | "name": "Prague" 25 | }, 26 | "country": { 27 | "code": "CZ", 28 | "name": "Czechia" 29 | }, 30 | "continent": { 31 | "code": "EU", 32 | "name": "Europe" 33 | }, 34 | "subdivisions": [ 35 | { 36 | "isoCode": "10", 37 | "name": "Hlavni mesto Praha" 38 | } 39 | ] 40 | }, 41 | "timestamp": 1655373953094, 42 | "time": "2022-06-16T10:05:53Z", 43 | "url": "https://dashboard.fingerprint.com/", 44 | "tag": {}, 45 | "confidence": { 46 | "score": 1 47 | }, 48 | "visitorFound": true, 49 | "firstSeenAt": { 50 | "global": "2022-02-04T11:31:20Z", 51 | "subscription": "2022-02-04T11:31:20Z" 52 | }, 53 | "lastSeenAt": { 54 | "global": "2022-06-16T10:03:00.912Z", 55 | "subscription": "2022-06-16T10:03:00.912Z" 56 | } 57 | } 58 | ], 59 | "lastTimestamp": 1655373953086, 60 | "paginationKey": "1655373953086.DDlfmP" 61 | } 62 | -------------------------------------------------------------------------------- /test/mocks/get_visitors_400_bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": "bad request" 3 | } 4 | -------------------------------------------------------------------------------- /test/mocks/get_visitors_403_forbidden.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": "Forbidden (HTTP 403)" 3 | } 4 | -------------------------------------------------------------------------------- /test/mocks/get_visitors_429_too_many_requests.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": "too many requests" 3 | } 4 | -------------------------------------------------------------------------------- /test/mocks/related-visitors/get_related_visitors_200.json: -------------------------------------------------------------------------------- 1 | { 2 | "relatedVisitors": [ 3 | { 4 | "visitorId": "NtCUJGceWX9RpvSbhvOm" 5 | }, 6 | { 7 | "visitorId": "25ee02iZwGxeyT0jMNkZ" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /test/mocks/related-visitors/get_related_visitors_200_empty.json: -------------------------------------------------------------------------------- 1 | { 2 | "relatedVisitors": [] 3 | } 4 | -------------------------------------------------------------------------------- /test/mocks/update_event_multiple_fields_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "linkedId": "myNewLinkedId", 3 | "tag": { 4 | "myTag": "myNewValue" 5 | }, 6 | "suspect": true 7 | } 8 | -------------------------------------------------------------------------------- /test/mocks/update_event_one_field_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "linkedId": "myNewLinkedId" 3 | } 4 | -------------------------------------------------------------------------------- /test/mocks/webhook.json: -------------------------------------------------------------------------------- 1 | { 2 | "requestId": "Px6VxbRC6WBkA39yeNH3", 3 | "url": "https://banking.example.com/signup", 4 | "ip": "216.3.128.12", 5 | "tag": { 6 | "requestType": "signup", 7 | "yourCustomId": 45321 8 | }, 9 | "time": "2019-10-12T07:20:50.52Z", 10 | "timestamp": 1554910997788, 11 | "ipLocation": { 12 | "accuracyRadius": 1, 13 | "city": { 14 | "name": "Bolingbrook" 15 | }, 16 | "continent": { 17 | "code": "NA", 18 | "name": "North America" 19 | }, 20 | "country": { 21 | "code": "US", 22 | "name": "United States" 23 | }, 24 | "latitude": 41.12933, 25 | "longitude": -88.9954, 26 | "postalCode": "60547", 27 | "subdivisions": [ 28 | { 29 | "isoCode": "IL", 30 | "name": "Illinois" 31 | } 32 | ], 33 | "timezone": "America/Chicago" 34 | }, 35 | "linkedId": "any-string", 36 | "visitorId": "3HNey93AkBW6CRbxV6xP", 37 | "visitorFound": true, 38 | "confidence": { 39 | "score": 0.97 40 | }, 41 | "firstSeenAt": { 42 | "global": "2022-03-16T11:26:45.362Z", 43 | "subscription": "2022-03-16T11:31:01.101Z" 44 | }, 45 | "lastSeenAt": { 46 | "global": "2022-03-16T11:28:34.023Z", 47 | "subscription": null 48 | }, 49 | "browserDetails": { 50 | "browserName": "Chrome", 51 | "browserFullVersion": "73.0.3683.86", 52 | "browserMajorVersion": "73", 53 | "os": "Mac OS X", 54 | "osVersion": "10.14.3", 55 | "device": "Other", 56 | "userAgent": "(Macintosh; Intel Mac OS X 10_14_3) Chrome/73.0.3683.86" 57 | }, 58 | "incognito": false, 59 | "clientReferrer": "https://google.com?search=banking+services", 60 | "bot": { 61 | "result": "bad", 62 | "type": "selenium" 63 | }, 64 | "userAgent": "(Macintosh; Intel Mac OS X 10_14_3) Chrome/73.0.3683.86", 65 | "rootApps": { 66 | "result": false 67 | }, 68 | "emulator": { 69 | "result": false 70 | }, 71 | "ipInfo": { 72 | "v4": { 73 | "address": "94.142.239.124", 74 | "geolocation": { 75 | "accuracyRadius": 20, 76 | "latitude": 50.05, 77 | "longitude": 14.4, 78 | "postalCode": "150 00", 79 | "timezone": "Europe/Prague", 80 | "city": { 81 | "name": "Prague" 82 | }, 83 | "country": { 84 | "code": "CZ", 85 | "name": "Czechia" 86 | }, 87 | "continent": { 88 | "code": "EU", 89 | "name": "Europe" 90 | }, 91 | "subdivisions": [ 92 | { 93 | "isoCode": "10", 94 | "name": "Hlavni mesto Praha" 95 | } 96 | ] 97 | }, 98 | "asn": { 99 | "asn": "7922", 100 | "name": "COMCAST-7922", 101 | "network": "73.136.0.0/13" 102 | }, 103 | "datacenter": { 104 | "result": true, 105 | "name": "DediPath" 106 | } 107 | } 108 | }, 109 | "ipBlocklist": { 110 | "result": false, 111 | "details": { 112 | "emailSpam": false, 113 | "attackSource": false 114 | } 115 | }, 116 | "tor": { 117 | "result": false 118 | }, 119 | "vpn": { 120 | "result": false, 121 | "confidence": "high", 122 | "originTimezone": "Europe/Berlin", 123 | "originCountry": "unknown", 124 | "methods": { 125 | "timezoneMismatch": false, 126 | "publicVPN": false, 127 | "auxiliaryMobile": false, 128 | "osMismatch": false, 129 | "relay": false 130 | } 131 | }, 132 | "proxy": { 133 | "result": false, 134 | "confidence": "high" 135 | }, 136 | "tampering": { 137 | "result": false, 138 | "anomalyScore": 0, 139 | "antiDetectBrowser": false 140 | }, 141 | "clonedApp": { 142 | "result": false 143 | }, 144 | "factoryReset": { 145 | "time": "1970-01-01T00:00:00Z", 146 | "timestamp": 0 147 | }, 148 | "jailbroken": { 149 | "result": false 150 | }, 151 | "frida": { 152 | "result": false 153 | }, 154 | "privacySettings": { 155 | "result": false 156 | }, 157 | "virtualMachine": { 158 | "result": false 159 | }, 160 | "rawDeviceAttributes": { 161 | "architecture": { 162 | "value": 127 163 | }, 164 | "audio": { 165 | "value": 35.73832903057337 166 | }, 167 | "canvas": { 168 | "value": { 169 | "Winding": true, 170 | "Geometry": "4dce9d6017c3e0c052a77252f29f2b1c", 171 | "Text": "dd2474a56ff78c1de3e7a07070ba3b7d" 172 | } 173 | }, 174 | "colorDepth": { 175 | "value": 30 176 | }, 177 | "colorGamut": { 178 | "value": "srgb" 179 | }, 180 | "contrast": { 181 | "value": 0 182 | }, 183 | "cookiesEnabled": { 184 | "value": true 185 | } 186 | }, 187 | "highActivity": { 188 | "result": false 189 | }, 190 | "locationSpoofing": { 191 | "result": true 192 | }, 193 | "suspectScore": { 194 | "result": 0 195 | }, 196 | "remoteControl": { 197 | "result": false 198 | }, 199 | "velocity": { 200 | "distinctIp": { 201 | "intervals": { 202 | "5m": 1, 203 | "1h": 1, 204 | "24h": 1 205 | } 206 | }, 207 | "distinctLinkedId": {}, 208 | "distinctCountry": { 209 | "intervals": { 210 | "5m": 1, 211 | "1h": 2, 212 | "24h": 2 213 | } 214 | }, 215 | "events": { 216 | "intervals": { 217 | "5m": 1, 218 | "1h": 5, 219 | "24h": 5 220 | } 221 | }, 222 | "ipEvents": { 223 | "intervals": { 224 | "5m": 1, 225 | "1h": 5, 226 | "24h": 5 227 | } 228 | }, 229 | "distinctIpByLinkedId": { 230 | "intervals": { 231 | "5m": 1, 232 | "1h": 5, 233 | "24h": 5 234 | } 235 | }, 236 | "distinctVisitorIdByLinkedId": { 237 | "intervals": { 238 | "5m": 1, 239 | "1h": 5, 240 | "24h": 5 241 | } 242 | } 243 | }, 244 | "developerTools": { 245 | "result": false 246 | }, 247 | "mitmAttack": { 248 | "result": false 249 | } 250 | } --------------------------------------------------------------------------------