Implements

Constructors

Properties

apiKey: string
authenticationMode: AuthenticationMode
region: Region

Methods

  • Delete data by visitor ID Request deleting all data associated with the specified visitor ID. This API is useful for compliance with privacy regulations. All delete requests are queued: Recent data (10 days or newer) belonging to the specified visitor will be deleted within 24 hours. * Data from older (11 days or more) identification events will be deleted after 90 days. If you are interested in using this API, please contact our support team to activate it for you. Otherwise, you will receive a 403.

    Parameters

    • visitorId: string

      The visitor ID you want to delete.*

    Returns Promise<void>

    Promise that resolves when the deletion request is successfully queued

    client
    .deleteVisitorData('<visitorId>')
    .then(() => {
    // Data deletion request was successfully queued
    })
    .catch((error) => {
    if (error instanceof RequestError) {
    console.log(error.statusCode, error.message)
    // Access raw response in error
    console.log(error.response)

    if(error instanceof TooManyRequestsError) {
    retryLater(error.retryAfter) // Needs to be implemented on your side
    }
    }
    })
  • Retrieves a specific identification event with the information from each activated product — Identification and all active Smart signals.

    Parameters

    • requestId: string

      identifier of the event

    Returns Promise<
        {
            products: {
                botd?: {
                    data?: {
                        bot: { result: "notDetected"
                        | "good"
                        | "bad"; type?: string };
                        ip: string;
                        linkedId?: string;
                        meta?: { [key: string]: unknown };
                        requestId: string;
                        time: string;
                        url: string;
                        userAgent: string;
                    };
                    error?: {
                        code: | "RequestCannotBeParsed"
                        | "TokenRequired"
                        | "TokenNotFound"
                        | "SubscriptionNotActive"
                        | "WrongRegion"
                        | "FeatureNotEnabled"
                        | "RequestNotFound"
                        | "VisitorNotFound"
                        | "TooManyRequests"
                        | "429 Too Many Requests"
                        | "StateNotReady"
                        | "Failed";
                        message: string;
                    };
                };
                clonedApp?: {
                    data?: { result: boolean };
                    error?: {
                        code:
                            | "RequestCannotBeParsed"
                            | "TokenRequired"
                            | "TokenNotFound"
                            | "SubscriptionNotActive"
                            | "WrongRegion"
                            | "FeatureNotEnabled"
                            | "RequestNotFound"
                            | "VisitorNotFound"
                            | "TooManyRequests"
                            | "429 Too Many Requests"
                            | "StateNotReady"
                            | "Failed";
                        message: string;
                    };
                };
                developerTools?: {
                    data?: { result: boolean };
                    error?: {
                        code:
                            | "RequestCannotBeParsed"
                            | "TokenRequired"
                            | "TokenNotFound"
                            | "SubscriptionNotActive"
                            | "WrongRegion"
                            | "FeatureNotEnabled"
                            | "RequestNotFound"
                            | "VisitorNotFound"
                            | "TooManyRequests"
                            | "429 Too Many Requests"
                            | "StateNotReady"
                            | "Failed";
                        message: string;
                    };
                };
                emulator?: {
                    data?: { result: boolean };
                    error?: {
                        code:
                            | "RequestCannotBeParsed"
                            | "TokenRequired"
                            | "TokenNotFound"
                            | "SubscriptionNotActive"
                            | "WrongRegion"
                            | "FeatureNotEnabled"
                            | "RequestNotFound"
                            | "VisitorNotFound"
                            | "TooManyRequests"
                            | "429 Too Many Requests"
                            | "StateNotReady"
                            | "Failed";
                        message: string;
                    };
                };
                factoryReset?: {
                    data?: { time: string; timestamp: number };
                    error?: {
                        code:
                            | "RequestCannotBeParsed"
                            | "TokenRequired"
                            | "TokenNotFound"
                            | "SubscriptionNotActive"
                            | "WrongRegion"
                            | "FeatureNotEnabled"
                            | "RequestNotFound"
                            | "VisitorNotFound"
                            | "TooManyRequests"
                            | "429 Too Many Requests"
                            | "StateNotReady"
                            | "Failed";
                        message: string;
                    };
                };
                frida?: {
                    data?: { result: boolean };
                    error?: {
                        code:
                            | "RequestCannotBeParsed"
                            | "TokenRequired"
                            | "TokenNotFound"
                            | "SubscriptionNotActive"
                            | "WrongRegion"
                            | "FeatureNotEnabled"
                            | "RequestNotFound"
                            | "VisitorNotFound"
                            | "TooManyRequests"
                            | "429 Too Many Requests"
                            | "StateNotReady"
                            | "Failed";
                        message: string;
                    };
                };
                highActivity?: {
                    data?: { dailyRequests?: number; result: boolean };
                    error?: {
                        code:
                            | "RequestCannotBeParsed"
                            | "TokenRequired"
                            | "TokenNotFound"
                            | "SubscriptionNotActive"
                            | "WrongRegion"
                            | "FeatureNotEnabled"
                            | "RequestNotFound"
                            | "VisitorNotFound"
                            | "TooManyRequests"
                            | "429 Too Many Requests"
                            | "StateNotReady"
                            | "Failed";
                        message: string;
                    };
                };
                identification?: {
                    data?: {
                        browserDetails: {
                            browserFullVersion: string;
                            browserMajorVersion: string;
                            browserName: string;
                            device: string;
                            os: string;
                            osVersion: string;
                            userAgent: string;
                        };
                        components?: {
                            [key: string]: { error?: (...)
                            | (...); value?: unknown };
                        };
                        confidence?: { comment?: string; revision?: string; score: number };
                        firstSeenAt: { global: null | string; subscription: null | string };
                        incognito: boolean;
                        ip: string;
                        ipLocation?: {
                            accuracyRadius?: number;
                            city?: { name: ... };
                            continent?: { code: ...; name: ... };
                            country?: { code: ...; name: ... };
                            latitude?: number;
                            longitude?: number;
                            postalCode?: string;
                            subdivisions?: (...)[];
                            timezone?: string;
                        };
                        lastSeenAt: { global: null
                        | string; subscription: null | string };
                        linkedId?: string;
                        requestId: string;
                        suspect?: boolean;
                        tag: { [key: string]: unknown };
                        time: string;
                        timestamp: number;
                        url: string;
                        visitorFound: boolean;
                        visitorId: string;
                    };
                    error?: {
                        code: | "RequestCannotBeParsed"
                        | "TokenRequired"
                        | "TokenNotFound"
                        | "SubscriptionNotActive"
                        | "WrongRegion"
                        | "FeatureNotEnabled"
                        | "RequestNotFound"
                        | "VisitorNotFound"
                        | "TooManyRequests"
                        | "429 Too Many Requests"
                        | "StateNotReady"
                        | "Failed";
                        message: string;
                    };
                };
                incognito?: {
                    data?: { result: boolean };
                    error?: {
                        code:
                            | "RequestCannotBeParsed"
                            | "TokenRequired"
                            | "TokenNotFound"
                            | "SubscriptionNotActive"
                            | "WrongRegion"
                            | "FeatureNotEnabled"
                            | "RequestNotFound"
                            | "VisitorNotFound"
                            | "TooManyRequests"
                            | "429 Too Many Requests"
                            | "StateNotReady"
                            | "Failed";
                        message: string;
                    };
                };
                ipBlocklist?: {
                    data?: {
                        details: { attackSource: boolean; emailSpam: boolean };
                        result: boolean;
                    };
                    error?: {
                        code: | "RequestCannotBeParsed"
                        | "TokenRequired"
                        | "TokenNotFound"
                        | "SubscriptionNotActive"
                        | "WrongRegion"
                        | "FeatureNotEnabled"
                        | "RequestNotFound"
                        | "VisitorNotFound"
                        | "TooManyRequests"
                        | "429 Too Many Requests"
                        | "StateNotReady"
                        | "Failed";
                        message: string;
                    };
                };
                ipInfo?: {
                    data?: {
                        v4?: {
                            address: string;
                            asn?: { asn: ...; name: ...; network: ... };
                            datacenter?: { name: ...; result: ... };
                            geolocation: {
                                accuracyRadius?: (...) | (...);
                                city?: (...) | (...);
                                continent?: (...) | (...);
                                country?: (...) | (...);
                                latitude?: (...) | (...);
                                longitude?: (...) | (...);
                                postalCode?: (...) | (...);
                                subdivisions?: (...) | (...);
                                timezone?: (...) | (...);
                            };
                        };
                        v6?: {
                            address: string;
                            asn?: { asn: ...; name: ...; network: ... };
                            datacenter?: { name: ...; result: ... };
                            geolocation: {
                                accuracyRadius?: (...) | (...);
                                city?: (...) | (...);
                                continent?: (...) | (...);
                                country?: (...) | (...);
                                latitude?: (...) | (...);
                                longitude?: (...) | (...);
                                postalCode?: (...) | (...);
                                subdivisions?: (...) | (...);
                                timezone?: (...) | (...);
                            };
                        };
                    };
                    error?: {
                        code: | "RequestCannotBeParsed"
                        | "TokenRequired"
                        | "TokenNotFound"
                        | "SubscriptionNotActive"
                        | "WrongRegion"
                        | "FeatureNotEnabled"
                        | "RequestNotFound"
                        | "VisitorNotFound"
                        | "TooManyRequests"
                        | "429 Too Many Requests"
                        | "StateNotReady"
                        | "Failed";
                        message: string;
                    };
                };
                jailbroken?: {
                    data?: { result: boolean };
                    error?: {
                        code:
                            | "RequestCannotBeParsed"
                            | "TokenRequired"
                            | "TokenNotFound"
                            | "SubscriptionNotActive"
                            | "WrongRegion"
                            | "FeatureNotEnabled"
                            | "RequestNotFound"
                            | "VisitorNotFound"
                            | "TooManyRequests"
                            | "429 Too Many Requests"
                            | "StateNotReady"
                            | "Failed";
                        message: string;
                    };
                };
                locationSpoofing?: {
                    data?: { result: boolean };
                    error?: {
                        code:
                            | "RequestCannotBeParsed"
                            | "TokenRequired"
                            | "TokenNotFound"
                            | "SubscriptionNotActive"
                            | "WrongRegion"
                            | "FeatureNotEnabled"
                            | "RequestNotFound"
                            | "VisitorNotFound"
                            | "TooManyRequests"
                            | "429 Too Many Requests"
                            | "StateNotReady"
                            | "Failed";
                        message: string;
                    };
                };
                mitmAttack?: {
                    data?: { result: boolean };
                    error?: {
                        code:
                            | "RequestCannotBeParsed"
                            | "TokenRequired"
                            | "TokenNotFound"
                            | "SubscriptionNotActive"
                            | "WrongRegion"
                            | "FeatureNotEnabled"
                            | "RequestNotFound"
                            | "VisitorNotFound"
                            | "TooManyRequests"
                            | "429 Too Many Requests"
                            | "StateNotReady"
                            | "Failed";
                        message: string;
                    };
                };
                privacySettings?: {
                    data?: { result: boolean };
                    error?: {
                        code:
                            | "RequestCannotBeParsed"
                            | "TokenRequired"
                            | "TokenNotFound"
                            | "SubscriptionNotActive"
                            | "WrongRegion"
                            | "FeatureNotEnabled"
                            | "RequestNotFound"
                            | "VisitorNotFound"
                            | "TooManyRequests"
                            | "429 Too Many Requests"
                            | "StateNotReady"
                            | "Failed";
                        message: string;
                    };
                };
                proxy?: {
                    data?: { result: boolean };
                    error?: {
                        code:
                            | "RequestCannotBeParsed"
                            | "TokenRequired"
                            | "TokenNotFound"
                            | "SubscriptionNotActive"
                            | "WrongRegion"
                            | "FeatureNotEnabled"
                            | "RequestNotFound"
                            | "VisitorNotFound"
                            | "TooManyRequests"
                            | "429 Too Many Requests"
                            | "StateNotReady"
                            | "Failed";
                        message: string;
                    };
                };
                rawDeviceAttributes?: {
                    data?: {
                        [key: string]: {
                            error?: { message?: (...)
                            | (...); name?: (...) | (...) };
                            value?: unknown;
                        };
                    };
                    error?: {
                        code: | "RequestCannotBeParsed"
                        | "TokenRequired"
                        | "TokenNotFound"
                        | "SubscriptionNotActive"
                        | "WrongRegion"
                        | "FeatureNotEnabled"
                        | "RequestNotFound"
                        | "VisitorNotFound"
                        | "TooManyRequests"
                        | "429 Too Many Requests"
                        | "StateNotReady"
                        | "Failed";
                        message: string;
                    };
                };
                remoteControl?: {
                    data?: { result: boolean };
                    error?: {
                        code:
                            | "RequestCannotBeParsed"
                            | "TokenRequired"
                            | "TokenNotFound"
                            | "SubscriptionNotActive"
                            | "WrongRegion"
                            | "FeatureNotEnabled"
                            | "RequestNotFound"
                            | "VisitorNotFound"
                            | "TooManyRequests"
                            | "429 Too Many Requests"
                            | "StateNotReady"
                            | "Failed";
                        message: string;
                    };
                };
                rootApps?: {
                    data?: { result: boolean };
                    error?: {
                        code:
                            | "RequestCannotBeParsed"
                            | "TokenRequired"
                            | "TokenNotFound"
                            | "SubscriptionNotActive"
                            | "WrongRegion"
                            | "FeatureNotEnabled"
                            | "RequestNotFound"
                            | "VisitorNotFound"
                            | "TooManyRequests"
                            | "429 Too Many Requests"
                            | "StateNotReady"
                            | "Failed";
                        message: string;
                    };
                };
                suspectScore?: {
                    data?: { result: number };
                    error?: {
                        code:
                            | "RequestCannotBeParsed"
                            | "TokenRequired"
                            | "TokenNotFound"
                            | "SubscriptionNotActive"
                            | "WrongRegion"
                            | "FeatureNotEnabled"
                            | "RequestNotFound"
                            | "VisitorNotFound"
                            | "TooManyRequests"
                            | "429 Too Many Requests"
                            | "StateNotReady"
                            | "Failed";
                        message: string;
                    };
                };
                tampering?: {
                    data?: {
                        anomalyScore: number;
                        antiDetectBrowser: boolean;
                        result: boolean;
                    };
                    error?: {
                        code: | "RequestCannotBeParsed"
                        | "TokenRequired"
                        | "TokenNotFound"
                        | "SubscriptionNotActive"
                        | "WrongRegion"
                        | "FeatureNotEnabled"
                        | "RequestNotFound"
                        | "VisitorNotFound"
                        | "TooManyRequests"
                        | "429 Too Many Requests"
                        | "StateNotReady"
                        | "Failed";
                        message: string;
                    };
                };
                tor?: {
                    data?: { result: boolean };
                    error?: {
                        code:
                            | "RequestCannotBeParsed"
                            | "TokenRequired"
                            | "TokenNotFound"
                            | "SubscriptionNotActive"
                            | "WrongRegion"
                            | "FeatureNotEnabled"
                            | "RequestNotFound"
                            | "VisitorNotFound"
                            | "TooManyRequests"
                            | "429 Too Many Requests"
                            | "StateNotReady"
                            | "Failed";
                        message: string;
                    };
                };
                velocity?: {
                    data?: {
                        distinctCountry: {
                            intervals?: { "1h": number; "24h"?: (...)
                            | (...); "5m": number };
                        };
                        distinctIp: {
                            intervals?: { "1h": number; "24h"?: (...)
                            | (...); "5m": number };
                        };
                        distinctIpByLinkedId: {
                            intervals?: { "1h": number; "24h"?: (...)
                            | (...); "5m": number };
                        };
                        distinctLinkedId: {
                            intervals?: { "1h": number; "24h"?: (...)
                            | (...); "5m": number };
                        };
                        distinctVisitorIdByLinkedId: {
                            intervals?: { "1h": number; "24h"?: (...)
                            | (...); "5m": number };
                        };
                        events: {
                            intervals?: { "1h": number; "24h"?: (...)
                            | (...); "5m": number };
                        };
                        ipEvents: {
                            intervals?: { "1h": number; "24h"?: (...)
                            | (...); "5m": number };
                        };
                    };
                    error?: {
                        code: | "RequestCannotBeParsed"
                        | "TokenRequired"
                        | "TokenNotFound"
                        | "SubscriptionNotActive"
                        | "WrongRegion"
                        | "FeatureNotEnabled"
                        | "RequestNotFound"
                        | "VisitorNotFound"
                        | "TooManyRequests"
                        | "429 Too Many Requests"
                        | "StateNotReady"
                        | "Failed";
                        message: string;
                    };
                };
                virtualMachine?: {
                    data?: { result: boolean };
                    error?: {
                        code:
                            | "RequestCannotBeParsed"
                            | "TokenRequired"
                            | "TokenNotFound"
                            | "SubscriptionNotActive"
                            | "WrongRegion"
                            | "FeatureNotEnabled"
                            | "RequestNotFound"
                            | "VisitorNotFound"
                            | "TooManyRequests"
                            | "429 Too Many Requests"
                            | "StateNotReady"
                            | "Failed";
                        message: string;
                    };
                };
                vpn?: {
                    data?: {
                        confidence: "high"
                        | "low"
                        | "medium";
                        methods: {
                            auxiliaryMobile: boolean;
                            osMismatch: boolean;
                            publicVPN: boolean;
                            relay: boolean;
                            timezoneMismatch: boolean;
                        };
                        originCountry: string;
                        originTimezone: string;
                        result: boolean;
                    };
                    error?: {
                        code: | "RequestCannotBeParsed"
                        | "TokenRequired"
                        | "TokenNotFound"
                        | "SubscriptionNotActive"
                        | "WrongRegion"
                        | "FeatureNotEnabled"
                        | "RequestNotFound"
                        | "VisitorNotFound"
                        | "TooManyRequests"
                        | "429 Too Many Requests"
                        | "StateNotReady"
                        | "Failed";
                        message: string;
                    };
                };
            };
        },
    >

    client
    .getEvent('<requestId>')
    .then((result) => console.log(result))
    .catch((error) => {
    if (error instanceof RequestError) {
    console.log(error.statusCode, error.message)
    // Access raw response in error
    console.log(error.response)
    }
    })
  • Related visitors API lets you link web visits and in-app browser visits that originated from the same mobile device. It searches the past 6 months of identification events to find the visitor IDs that belong to the same mobile device as the given visitor ID. ⚠️ Please note that this API is not enabled by default and is billable separately. ⚠️ If you would like to use Related visitors API, please contact our support team. To learn more, see Related visitors API reference.

    Parameters

    • filter: { visitor_id: string }

      Related visitors filter

      • visitor_id: string

        The visitor ID for which you want to find the other visitor IDs that originated from the same mobile device.

    Returns Promise<{ relatedVisitors: { visitorId: string }[] }>

    client
    .getRelatedVisitors({ visitor_id: '<visitorId>' })
    .then((relatedVisits) => {
    console.log(relatedVisits)
    })
    .catch((error) => {
    if (error instanceof RequestError) {
    console.log(error.statusCode, error.message)
    // Access raw response in error
    console.log(error.response)

    if(error instanceof TooManyRequestsError) {
    retryLater(error.retryAfter) // Needs to be implemented on your side
    }
    }
    })
  • Parameters

    • visitorId: string
    • Optionalfilter: {
          before?: number;
          limit?: number;
          linked_id?: string;
          paginationKey?: string;
          request_id?: string;
      }
      • Optionalbefore?: number

        ⚠️ Deprecated pagination method, please use paginationKey instead. Timestamp (in milliseconds since epoch) used to paginate results.

      • Optionallimit?: number

        Limit scanned results.

        For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first).
        By default, the most recent 100 visits are scanned, the maximum is 500.
        
      • Optionallinked_id?: string

        Filter visits by your custom identifier.

        You can use [`linkedId`](https://dev.fingerprint.com/reference/get-function#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier.
        
      • OptionalpaginationKey?: string

        Use paginationKey to get the next page of results.

        When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results:
        
        1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200`
        2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j`
        
        Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned.
        
      • Optionalrequest_id?: string

        Filter visits by requestId.

        Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/reference/get-function#requestid). When you filter visits by `requestId`, only one visit will be returned.
        

    Returns Promise<
        {
            lastTimestamp?: number;
            paginationKey?: string;
            visitorId: string;
            visits: {
                browserDetails: {
                    browserFullVersion: string;
                    browserMajorVersion: string;
                    browserName: string;
                    device: string;
                    os: string;
                    osVersion: string;
                    userAgent: string;
                };
                components?: {
                    [key: string]: {
                        error?: { message?: string; name?: string };
                        value?: unknown;
                    };
                };
                confidence?: { comment?: string; revision?: string; score: number };
                firstSeenAt: { global: null | string; subscription: null | string };
                incognito: boolean;
                ip: string;
                ipLocation?: {
                    accuracyRadius?: number;
                    city?: { name: string };
                    continent?: { code: string; name: string };
                    country?: { code: string; name: string };
                    latitude?: number;
                    longitude?: number;
                    postalCode?: string;
                    subdivisions?: { isoCode: string; name: string }[];
                    timezone?: string;
                };
                lastSeenAt: { global: null
                | string; subscription: null | string };
                linkedId?: string;
                requestId: string;
                tag: { [key: string]: unknown };
                time: string;
                timestamp: number;
                url: string;
                visitorFound: boolean;
            }[];
        },
    >

    Please use FingerprintJsServerApiClient.getVisits instead

  • Retrieves event history for the specific visitor using the given filter, returns a promise with visitor history response.

    Parameters

    • visitorId: string

      Identifier of the visitor

    • Optionalfilter: {
          before?: number;
          limit?: number;
          linked_id?: string;
          paginationKey?: string;
          request_id?: string;
      }

      Visitor history filter

      • Optionalbefore?: number

        ⚠️ Deprecated pagination method, please use paginationKey instead. Timestamp (in milliseconds since epoch) used to paginate results.

      • Optionallimit?: number

        Limit scanned results.

        For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first).
        By default, the most recent 100 visits are scanned, the maximum is 500.
        
      • Optionallinked_id?: string

        Filter visits by your custom identifier.

        You can use [`linkedId`](https://dev.fingerprint.com/reference/get-function#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier.
        
      • OptionalpaginationKey?: string

        Use paginationKey to get the next page of results.

        When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results:
        
        1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200`
        2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j`
        
        Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned.
        
      • Optionalrequest_id?: string

        Filter visits by requestId.

        Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/reference/get-function#requestid). When you filter visits by `requestId`, only one visit will be returned.
        

    Returns Promise<
        {
            lastTimestamp?: number;
            paginationKey?: string;
            visitorId: string;
            visits: {
                browserDetails: {
                    browserFullVersion: string;
                    browserMajorVersion: string;
                    browserName: string;
                    device: string;
                    os: string;
                    osVersion: string;
                    userAgent: string;
                };
                components?: {
                    [key: string]: {
                        error?: { message?: string; name?: string };
                        value?: unknown;
                    };
                };
                confidence?: { comment?: string; revision?: string; score: number };
                firstSeenAt: { global: null | string; subscription: null | string };
                incognito: boolean;
                ip: string;
                ipLocation?: {
                    accuracyRadius?: number;
                    city?: { name: string };
                    continent?: { code: string; name: string };
                    country?: { code: string; name: string };
                    latitude?: number;
                    longitude?: number;
                    postalCode?: string;
                    subdivisions?: { isoCode: string; name: string }[];
                    timezone?: string;
                };
                lastSeenAt: { global: null
                | string; subscription: null | string };
                linkedId?: string;
                requestId: string;
                tag: { [key: string]: unknown };
                time: string;
                timestamp: number;
                url: string;
                visitorFound: boolean;
            }[];
        },
    >

    client
    .getVisits('<visitorId>', { limit: 1 })
    .then((visitorHistory) => {
    console.log(visitorHistory)
    })
    .catch((error) => {
    if (error instanceof RequestError) {
    console.log(error.statusCode, error.message)
    // Access raw response in error
    console.log(error.response)

    if(error instanceof TooManyRequestsError) {
    retryLater(error.retryAfter) // Needs to be implemented on your side
    }
    }
    })
  • Search for identification events, including Smart Signals, using multiple filtering criteria. If you don't provide start or end parameters, the default search range is the last 7 days.

    Please note that events include mobile signals (e.g. rootApps) even if the request originated from a non-mobile platform. We recommend you ignore mobile signals for such requests.

    Parameters

    • filter: {
          anti_detect_browser?: boolean;
          bot?: "all" | "none" | "good" | "bad";
          cloned_app?: boolean;
          emulator?: boolean;
          end?: number;
          factory_reset?: boolean;
          frida?: boolean;
          incognito?: boolean;
          ip_address?: string;
          jailbroken?: boolean;
          limit: number;
          linked_id?: string;
          min_suspect_score?: number;
          pagination_key?: string;
          privacy_settings?: boolean;
          reverse?: boolean;
          root_apps?: boolean;
          start?: number;
          suspect?: boolean;
          tampering?: boolean;
          virtual_machine?: boolean;
          visitor_id?: string;
          vpn?: boolean;
          vpn_confidence?: "low" | "medium" | "high,";
      }

      Events filter

      • Optionalanti_detect_browser?: boolean

        Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the products.tampering.data.antiDetectBrowser property set to true or false are returned. Events without a products.tampering Smart Signal result are left out of the response.

      • Optionalbot?: "all" | "none" | "good" | "bad"

        Filter events by the Bot Detection result, specifically: all - events where any kind of bot was detected. good - events where a good bot was detected. bad - events where a bad bot was detected. none - events where no bot was detected. > Note: When using this parameter, only events with the products.botd.data.bot.result property set to a valid value are returned. Events without a products.botd Smart Signal result are left out of the response.

      • Optionalcloned_app?: boolean

        Filter events by Cloned App Detection result. > Note: When using this parameter, only events with the products.clonedApp.data.result property set to true or false are returned. Events without a products.clonedApp Smart Signal result are left out of the response.

      • Optionalemulator?: boolean

        Filter events by Android Emulator Detection result. > Note: When using this parameter, only events with the products.emulator.data.result property set to true or false are returned. Events without a products.emulator Smart Signal result are left out of the response.

      • Optionalend?: number

        Filter events with a timestamp smaller than the end time, in Unix time (milliseconds).

      • Optionalfactory_reset?: boolean

        Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with the products.factoryReset.data.result property set to true or false are returned. Events without a products.factoryReset Smart Signal result are left out of the response.

      • Optionalfrida?: boolean

        Filter events by Frida Detection result. > Note: When using this parameter, only events with the products.frida.data.result property set to true or false are returned. Events without a products.frida Smart Signal result are left out of the response.

      • Optionalincognito?: boolean

        Filter events by Browser Incognito Detection result. > Note: When using this parameter, only events with the products.incognito.data.result property set to true or false are returned. Events without a products.incognito Smart Signal result are left out of the response.

      • Optionalip_address?: string

        Filter events by IP address range. The range can be as specific as a single IP (/32 for IPv4 or /128 for IPv6) All ip_address filters must use CIDR notation, for example, 10.0.0.0/24, 192.168.0.1/32

      • Optionaljailbroken?: boolean

        Filter events by Jailbroken Device Detection result. > Note: When using this parameter, only events with the products.jailbroken.data.result property set to true or false are returned. Events without a products.jailbroken Smart Signal result are left out of the response.

      • limit: number

        Limit the number of events returned.

      • Optionallinked_id?: string

        Filter events by your custom identifier.

        You can use [linked IDs](https://dev.fingerprint.com/reference/get-function#linkedid) to associate identification requests with your own identifier, for example, session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier.
        
      • Optionalmin_suspect_score?: number

        Filter events with Suspect Score result above a provided minimum threshold. > Note: When using this parameter, only events where the products.suspectScore.data.result property set to a value exceeding your threshold are returned. Events without a products.suspectScore Smart Signal result are left out of the response.

      • Optionalpagination_key?: string

        Use pagination_key to get the next page of results.

        When more results are available (e.g., you requested up to 200 results for your search using `limit`, but there are more than 200 events total matching your request), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `timestamp` of the last returned event. In the following request, use that value in the `pagination_key` parameter to get the next page of results:
        
        1. First request, returning most recent 200 events: `GET api-base-url/events/search?limit=200`
        2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/events/search?limit=200&pagination_key=1740815825085`
        
      • Optionalprivacy_settings?: boolean

        Filter events by Privacy Settings Detection result. > Note: When using this parameter, only events with the products.privacySettings.data.result property set to true or false are returned. Events without a products.privacySettings Smart Signal result are left out of the response.

      • Optionalreverse?: boolean

        Sort events in reverse timestamp order.

      • Optionalroot_apps?: boolean

        Filter events by Rooted Device Detection result. > Note: When using this parameter, only events with the products.rootApps.data.result property set to true or false are returned. Events without a products.rootApps Smart Signal result are left out of the response.

      • Optionalstart?: number

        Filter events with a timestamp greater than the start time, in Unix time (milliseconds).

      • Optionalsuspect?: boolean

        Filter events previously tagged as suspicious via the Update API. > Note: When using this parameter, only events with the suspect property explicitly set to true or false are returned. Events with undefined suspect property are left out of the response.

      • Optionaltampering?: boolean

        Filter events by Tampering Detection result. > Note: When using this parameter, only events with the products.tampering.data.result property set to true or false are returned. Events without a products.tampering Smart Signal result are left out of the response.

      • Optionalvirtual_machine?: boolean

        Filter events by Virtual Machine Detection result. > Note: When using this parameter, only events with the products.virtualMachine.data.result property set to true or false are returned. Events without a products.virtualMachine Smart Signal result are left out of the response.

      • Optionalvisitor_id?: string

        Unique visitor identifier issued by Fingerprint Pro. Filter for events matching this visitor_id.

      • Optionalvpn?: boolean

        Filter events by VPN Detection result. > Note: When using this parameter, only events with the products.vpn.data.result property set to true or false are returned. Events without a products.vpn Smart Signal result are left out of the response.

      • Optionalvpn_confidence?: "low" | "medium" | "high,"

        Filter events by VPN Detection result confidence level. high - events with high VPN Detection confidence. medium - events with medium VPN Detection confidence. low - events with low VPN Detection confidence. > Note: When using this parameter, only events with the products.vpn.data.confidence property set to a valid value are returned. Events without a products.vpn Smart Signal result are left out of the response.

    Returns Promise<
        {
            events?: {
                products: {
                    botd?: {
                        data?: {
                            bot: { result: ...; type?: ... };
                            ip: string;
                            linkedId?: (...) | (...);
                            meta?: (...) | (...);
                            requestId: string;
                            time: string;
                            url: string;
                            userAgent: string;
                        };
                        error?: {
                            code: | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...);
                            message: string;
                        };
                    };
                    clonedApp?: {
                        data?: { result: boolean };
                        error?: {
                            code:
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                            message: string;
                        };
                    };
                    developerTools?: {
                        data?: { result: boolean };
                        error?: {
                            code:
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                            message: string;
                        };
                    };
                    emulator?: {
                        data?: { result: boolean };
                        error?: {
                            code:
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                            message: string;
                        };
                    };
                    factoryReset?: {
                        data?: { time: string; timestamp: number };
                        error?: {
                            code:
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                            message: string;
                        };
                    };
                    frida?: {
                        data?: { result: boolean };
                        error?: {
                            code:
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                            message: string;
                        };
                    };
                    highActivity?: {
                        data?: { dailyRequests?: (...)
                        | (...); result: boolean };
                        error?: {
                            code:
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                            message: string;
                        };
                    };
                    identification?: {
                        data?: {
                            browserDetails: {
                                browserFullVersion: ...;
                                browserMajorVersion: ...;
                                browserName: ...;
                                device: ...;
                                os: ...;
                                osVersion: ...;
                                userAgent: ...;
                            };
                            components?: (...)
                            | (...);
                            confidence?: (...) | (...);
                            firstSeenAt: { global: ...; subscription: ... };
                            incognito: boolean;
                            ip: string;
                            ipLocation?: (...) | (...);
                            lastSeenAt: { global: ...; subscription: ... };
                            linkedId?: (...) | (...);
                            requestId: string;
                            suspect?: (...) | (...) | (...);
                            tag: { [key: ...]: ... };
                            time: string;
                            timestamp: number;
                            url: string;
                            visitorFound: boolean;
                            visitorId: string;
                        };
                        error?: {
                            code: | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...);
                            message: string;
                        };
                    };
                    incognito?: {
                        data?: { result: boolean };
                        error?: {
                            code:
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                            message: string;
                        };
                    };
                    ipBlocklist?: {
                        data?: {
                            details: { attackSource: ...; emailSpam: ... };
                            result: boolean;
                        };
                        error?: {
                            code: | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...);
                            message: string;
                        };
                    };
                    ipInfo?: {
                        data?: { v4?: (...)
                        | (...); v6?: (...) | (...) };
                        error?: {
                            code:
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                            message: string;
                        };
                    };
                    jailbroken?: {
                        data?: { result: boolean };
                        error?: {
                            code:
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                            message: string;
                        };
                    };
                    locationSpoofing?: {
                        data?: { result: boolean };
                        error?: {
                            code:
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                            message: string;
                        };
                    };
                    mitmAttack?: {
                        data?: { result: boolean };
                        error?: {
                            code:
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                            message: string;
                        };
                    };
                    privacySettings?: {
                        data?: { result: boolean };
                        error?: {
                            code:
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                            message: string;
                        };
                    };
                    proxy?: {
                        data?: { result: boolean };
                        error?: {
                            code:
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                            message: string;
                        };
                    };
                    rawDeviceAttributes?: {
                        data?: { [key: string]: { error?: ...; value?: ... } };
                        error?: {
                            code:
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                            message: string;
                        };
                    };
                    remoteControl?: {
                        data?: { result: boolean };
                        error?: {
                            code:
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                            message: string;
                        };
                    };
                    rootApps?: {
                        data?: { result: boolean };
                        error?: {
                            code:
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                            message: string;
                        };
                    };
                    suspectScore?: {
                        data?: { result: number };
                        error?: {
                            code:
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                            message: string;
                        };
                    };
                    tampering?: {
                        data?: {
                            anomalyScore: number;
                            antiDetectBrowser: boolean;
                            result: boolean;
                        };
                        error?: {
                            code: | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...);
                            message: string;
                        };
                    };
                    tor?: {
                        data?: { result: boolean };
                        error?: {
                            code:
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                            message: string;
                        };
                    };
                    velocity?: {
                        data?: {
                            distinctCountry: { intervals?: ... };
                            distinctIp: { intervals?: ... };
                            distinctIpByLinkedId: { intervals?: ... };
                            distinctLinkedId: { intervals?: ... };
                            distinctVisitorIdByLinkedId: { intervals?: ... };
                            events: { intervals?: ... };
                            ipEvents: { intervals?: ... };
                        };
                        error?: {
                            code: | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...);
                            message: string;
                        };
                    };
                    virtualMachine?: {
                        data?: { result: boolean };
                        error?: {
                            code:
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                            message: string;
                        };
                    };
                    vpn?: {
                        data?: {
                            confidence: (...)
                            | (...)
                            | (...);
                            methods: {
                                auxiliaryMobile: ...;
                                osMismatch: ...;
                                publicVPN: ...;
                                relay: ...;
                                timezoneMismatch: ...;
                            };
                            originCountry: string;
                            originTimezone: string;
                            result: boolean;
                        };
                        error?: {
                            code: | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...);
                            message: string;
                        };
                    };
                };
            }[];
            paginationKey?: string;
        },
    >

  • Update an event with a given request ID

    Parameters

    • body: { linkedId?: string; suspect?: boolean; tag?: { [key: string]: unknown } }

      Data to update the event with.

      • OptionallinkedId?: string

        LinkedID value to assign to the existing event

      • Optionalsuspect?: boolean

        Suspect flag indicating observed suspicious or fraudulent event

      • Optionaltag?: { [key: string]: unknown }

        A customer-provided value or an object that was sent with identification request.

    • requestId: string

      The unique event identifier.

    Returns Promise<void>

    Change information in existing events specified by requestId or flag suspicious events.

    When an event is created, it is assigned linkedId and tag submitted through the JS agent parameters. This information might not be available on the client so the Server API allows for updating the attributes after the fact.

    Warning It's not possible to update events older than 10 days.

    const body = {
    linkedId: 'linked_id',
    suspect: false,
    }

    client
    .updateEvent(body, '<requestId>')
    .then(() => {
    // Event was successfully updated
    })
    .catch((error) => {
    if (error instanceof RequestError) {
    console.log(error.statusCode, error.message)
    // Access raw response in error
    console.log(error.response)

    if(error.statusCode === 409) {
    // Event is not mutable yet, wait a couple of seconds and retry the update.
    }
    }
    })