Get Started with FACEIO

Implement passwordless facial authentication in under 5 minutes. Create a FACEIO application, review its security and privacy options, integrate fio.js, then use enroll() for new users and authenticate() for returning users.

Create an application in the FACEIO Console, copy its Public ID, and use it to initialize fio.js on your website or web app.

FACEIO in Under 5 Minutes

A practical setup guide for websites and web applications

This guide covers the FACEIO integration sequence: create an application in the FACEIO Console ↗, select a facial recognition engine, review security and privacy settings, load the fio.js library, enroll new users, authenticate returning users, and manage the application from the Console.

Quick Tip

Review the HTML Integration Boilerplate for a working enrollment and authentication example.

FACEIO Widget in action showing enrollment and authentication flow

Live Integration Example: See how FACEIO works in real applications. Explore community tutorials for framework-specific implementations.

FACEIO Integration Steps

Follow the setup sequence from application creation to production configuration:

1

How FACEIO Works

Understand how FACEIO adds facial enrollment and authentication to a website or web application.

2

Integration Checklist

Review the essential steps needed for a smooth integration of fio.js on your website or web application.

3

Create Your Application

Set up your first FACEIO application, choose a facial recognition engine, configure security settings, and customize the widget appearance.

4

Add fio.js Library

Integrate the fio.js library on your website and initialize it with your application's Public ID.

5

enroll() and authenticate()

Review the fio.js methods used to enroll new users and authenticate returning users.

6

Enroll Your First User

Implement user enrollment and authentication with working code examples, then adapt the result to your account and session logic.

7

Integration Boilerplate

Use an HTML boilerplate containing both enrollment and authentication examples.

8

Manage Your Application

Monitor real-time metrics, configure security settings, set up webhooks, retrieve API keys, and manage your facial index.

Introducing FACEIO

How FACEIO adds facial authentication to web login flows

TL;DR

FACEIO is a cross-browser facial authentication framework for websites and web applications. Its fio.js library opens the enrollment and authentication widget from your existing frontend and returns a Facial ID and application payload for your account flow.

What is FACEIO?

  • FACEIO is a cross-browser facial authentication framework available as a managed service or on-premises deployment. Its client-side JavaScript library, fio.js, adds enrollment and authentication flows to websites and web applications.

  • Add fio.js to your frontend and initialize it with the application's Public ID. New users register through enroll(), while returning users sign in through authenticate() using a supported browser and camera.

  • Your backend should associate the returned Facial ID with the relevant account, apply its own authorization and session rules, and provide a recovery method for users who cannot complete facial authentication.

  • FACEIO works with standard webcams and smartphone front cameras in supported modern browsers, with no dedicated biometric sensor required on the client. The fio.js JavaScript library is framework-agnostic and connects to common frontend and backend stacks.

Notable Features of FACEIO

Compares a fresh capture with the enrolled face index and returns an authentication result without requiring a password or OTP in the primary FACEIO flow.

Select a supported facial recognition engine and deployment region when configuring the application.

The fio.js library is framework-agnostic and integrates with plain JavaScript, React, Vue, Angular, Next.js, and other frontend stacks.

Works on supported modern browsers with a standard webcam or front-facing camera. Create an application ↗

Supports current versions of major browsers, subject to camera access and browser capabilities.

Uses liveness checks and default PIN Code validation as part of the facial authentication flow.

Provides configurable security controls and documented privacy practices without requiring a dedicated biometric sensor.

Supports cloud facial recognition engines and PixLab Insight on-premises. The selected facial recognition engine manages biometric hashes according to the application owner's configuration.

Privacy & Data Protection

  • Application owners must provide the required notices and consent flow, maintain an appropriate fallback, and support user deletion requests. Review the privacy best-practice guide before production rollout.

  • FACEIO itself does not store, handle, or access biometric hashes. The facial recognition engine selected by the application owner manages them according to that engine's deployment and storage configuration. See the Trust Center for service privacy and security information.

Quick Tip

Review the HTML Integration Boilerplate or visit the frequently asked questions for additional context.

Integration Checklist

Essential steps for a smooth fio.js integration

Begin by creating a FACEIO application in the FACEIO Console ↗ and linking it to your website or web application. Then load and initialize fio.js, enroll a test user, and verify the returning-user authentication flow.

Before You Begin

Official integration guides with code samples are available in the Developer Center.

To enable facial authentication for your users, follow these steps:

1

Connect to the FACEIO Console

Log in to the FACEIO Console ↗ using your email address. Once connected, use the Application Wizard to create your first FACEIO application and link it to your website or web application.

2

Configure Your Application

In the Application Wizard, enter an application name, select a facial recognition engine, choose a deployment region, review security and privacy options, and customize the Widget.

3

Integrate the fio.js Library

Once your FACEIO application is created, implement fio.js, our facial authentication JavaScript library, on your website and initialize it using your application's Public ID.

4

Test Enrollment and Authentication

After loading and initializing fio.js, call enroll() and authenticate() for a new user and a returning user, as covered in the following sections.

Create Your Application

Set up your FACEIO application on the Console

  • Before implementing fio.js and rolling out facial authentication to your users, you must first link your website or web application to a FACEIO Application via the FACEIO Console ↗.

  • Each enrolled user receives a Facial ID, and your application can associate its own metadata through the payload parameter. The selected facial recognition engine manages the biometric hash in an isolated application index. FACEIO itself does not store, handle, or access biometric hashes. Review the engine, deployment region, and privacy configuration in the Application Manager on the Console ↗.

  • You can create a new application on the FACEIO Console ↗ in just a few minutes using the Application Wizard. The wizard covers application naming, facial recognition engine selection, deployment region, security settings, privacy options, and Widget customization.

Create and configure the application:

1

Connect to the FACEIO Console ↗.

2

On the Console main view, click New Application. This will launch the Application Wizard.

3

In the Application Wizard, follow the on-screen instructions as shown below. This involves entering an application name, privacy policy URL, selecting a Facial Recognition Engine, choosing cloud storage region or on-premise deployment, configuring security options, and customizing the widget.

FACEIO Application Wizard interface showing step-by-step configuration

Click to explore the Application Wizard

4

Finally, review your configuration and submit. Once your application is successfully created, you'll be redirected to the Application Manager ↗, where you can manage your new application with a step-by-step integration guide.

Application Created

Copy the application's Public ID from the Console. You will use it to initialize fio.js before calling enroll() or authenticate().

Add the fio.js Library

Load and initialize the facial authentication JavaScript library on your website

Complete Documentation

The complete integration guide and official documentation are available in the Integration Guide.

After creating your first application through the FACEIO Console ↗, you will need to integrate fio.js, FACEIO's facial authentication JavaScript library, into your website or web application. This step is required before you can enable facial authentication for your users. The basic setup takes three lines of code, as shown below.

1 Import fio.js to Your Site

Paste the following snippet before the closing </body> tag of the HTML page(s) where you want to use fio.js:

fio.js import snippet. The library can be imported by linking to FACEIO's CDN ↗ resource.

HTML
<div id="faceio-modal"></div>
<script src="https://cdn.faceio.net/fio.js"></script>

The snippet above loads fio.js asynchronously. A basic HTML page can initialize the library as follows:

Typical HTML page with fio.js imported

HTML
<html>
  <head>
    <title>Sign-In via Face Recognition</title>
  </head>
  <body>
    <div id="faceio-modal"></div>
    <script src="https://cdn.faceio.net/fio.js"></script>
  </body>
</html>
  • See the HTML Integration Boilerplate for a complete template that you can copy, adapt, and test on your server.

  • Always load fio.js directly from cdn.faceio.net ↗. You can't self-host it. This will prevent you from receiving bug fixes and new features.

2 Instantiate a faceIO Object

To initialize fio.js, simply instantiate a new faceIO() object and pass your application Public ID as shown below. You can also insert this snippet right after the import code from Step 1. For a complete example, refer to the HTML Boilerplate.

JavaScript snippet to instantiate a new faceIO() object

HTML
<script type="text/javascript">
   /* Instantiate fio.js with your application Public ID */
    const faceio = new faceIO("app-public-id");
</script>

Before you continue, your Public ID is available in the Application Manager on the FACEIO Console ↗. Make sure you've:

3 Invoke the Widget

fio.js is now loaded and initialized. Call enroll() to register a new user or authenticate() to authenticate a returning user.

  • enroll() is for registering new users (enrollment/sign-up)

  • authenticate() is for authenticating existing users (identification/sign-in)

Before we dive into these methods, here's what a typical HTML page implementing fio.js for the first time looks like:

Complete HTML page with fio.js ready to invoke enroll() or authenticate()

HTML
<html>
  <head>
    <title>Sign-In or Enroll via Face Recognition</title>
  </head>
  <body>
    <button onclick="enrollNewUser()">Enroll New User</button>
    <button onclick="authenticateUser()">Authenticate User</button>
    <div id="faceio-modal"></div>
    <script src="https://cdn.faceio.net/fio.js"></script>
    <script type="text/javascript">
        // Instantiate fio.js with your application's Public ID
        const faceio = new faceIO("app-public-id");
        function enrollNewUser(){
           // call to faceio.enroll() here will automatically trigger the on-boarding process
        }
        function authenticateUser(){
           // call to faceio.authenticate() here will automatically trigger the facial authentication process
        }
        function handleError(errCode){
            // Handle error here
        }
    </script>
  </body>
</html>

Reference Template

The HTML Boilerplate section provides a complete reference implementation with both enroll() and authenticate() methods.

Next, review the two fio.js methods used for enrollment and authentication.

Enrollment and Authentication Methods

Use enroll() for new users and authenticate() for returning users

fio.js provides two primary methods for a facial authentication flow:

The enroll() Method

  • Call enroll() on the initialized faceIO object to register a new user. It opens the FACEIO Widget and starts the facial enrollment flow from your existing sign-up or onboarding page.

  • When you call enroll(), the FACEIO Widget opens, requests user consent and camera access when needed, and captures the face data required for enrollment. The selected facial recognition engine generates and indexes the biometric hash used for future authentication.

  • enroll() accepts several optional parameters, such as locale for the interaction language, permissionTimeout for the camera access wait time, and most importantly payload, which is arbitrary data you can associate with the user like an email, name, or ID. This payload is returned after a successful future authentication.

  • enroll() returns a Promise that resolves to a userInfo object when enrollment succeeds. It includes the user's Facial ID, enrollment timestamp, and the details.age and details.gender estimates. Use the Facial ID as a lookup key for the corresponding backend account during future authentication.

  • If the user denies camera access or rejects Terms of Service, the promise is rejected with the corresponding error code (e.g., fioErrCode.PERMISSION_REFUSED or fioErrCode.TERMS_NOT_ACCEPTED). Refer to the Error Codes section for a complete list.

  • The enroll() method, parameters, return values, and error handling are documented in the Integration Guide.

The authenticate() Method

  • Call authenticate() on the initialized faceIO object to recognize a previously enrolled user. Use it from the website or web app's sign-in flow.

  • When you call authenticate(), the FACEIO Widget opens, requests camera access when needed, performs the configured liveness and facial recognition checks, and returns the authentication result.

  • Depending on your app's security configuration, once the user is successfully identified by the facial recognition engine, they may need to confirm their PIN code (chosen during enrollment) for the authenticate() method to succeed.

  • authenticate() accepts several optional parameters, including permissionTimeout for camera access wait time, locale for the interaction language, and other options, all documented here.

  • authenticate() returns a Promise that resolves with a userData object upon successful identification. Key properties include: payload (the data you linked during enrollment) and facialId (the user's unique identifier). Together, these can serve as lookup keys in your backend to fetch user-specific data.

  • The authenticate() method, parameters, return values, and error handling are documented in the Integration Guide.

Next: Test Both Methods

The next section provides working examples for enrolling a new user and authenticating a returning user.

Enroll & Authenticate Your First User

Working enrollment and authentication examples

To start facial recognition, call enroll() or authenticate(), the two core methods of the faceIO() class you instantiated. enroll() is used for onboarding new users, while authenticate() identifies returning users.

Enrolling a New User

Onboarding a new user (extracting and indexing their facial features after obtaining consent) is accomplished with a simple call to enroll():

Typical invocation of the enroll() method

HTML
// Instantiate a new faceIO object with your application's Public ID
const faceio = new faceIO("app-public-id");
function enrollNewUser(){
  faceio.enroll({
    "locale": "auto", // Default user locale
    "payload": {
        /* The payload we want to associate with this particular user which is forwarded back to us upon future authentication of this user.*/
        "whoami": 123456, // Dummy ID linked to this particular user
        "email": "john.doe@example.com"
        }
    }).then(userInfo => {
        // User Successfully Enrolled! 
        alert(
            `User Successfully Enrolled! Details:
           Unique Facial ID: ${userInfo.facialId}
           Enrollment Date: ${userInfo.timestamp}
           Estimated Gender: ${userInfo.details.gender}
           Approximate Age: ${userInfo.details.age}`
        );
       console.log(userInfo);
       // handle success, save the facial ID (userInfo.facialId), redirect to the dashboard...
    }).catch(errCode => {
       // Something went wrong during enrollment, log the failure
       handleError(errCode);
    })
}
  • Initialization: Instantiate the faceIO object with your application's Public ID. Replace "app-public-id" with your actual Public ID from the FACEIO Console ↗.

  • Enrollment call: The enroll() call starts registration, requests user consent and camera access when required, and initiates facial feature extraction. The payload parameter lets you associate data with the user, such as a user ID (whoami) and email address. This payload will be returned upon successful future authentication.

  • Enrollment result: On successful enrollment, the promise resolves with a userInfo object containing the unique Facial ID, enrollment timestamp, and the details.gender and details.age estimates. Store the Facial ID in your database to identify this user during future authentication.

  • Error handling: Catch enrollment failures and implement a handleError() function to handle the returned error codes. Review the error codes documentation for all possible error codes.

Authenticating an Existing User

Similarly, authenticating (recognizing) a previously enrolled user is accomplished with a simple call to authenticate():

Typical invocation of the authenticate() method

HTML
const faceio = new faceIO("app-public-id"); // Initialize with your application's Public ID
function authenticateUser(){
    faceio.authenticate({
        "locale": "auto" // Default user locale
    }).then(userData => {
        console.log("Success, user identified")
        // Read the Facial ID returned for this user. It remains the same
        // after each successful authentication in this application.
        // Store it as the lookup key for the corresponding backend account.
        console.log("Linked facial Id: " + userData.facialId)
        // Grab the arbitrary data you have already linked (if any) to this particular user
        // during enrollment via the payload parameter of the enroll() method.
        console.log("Payload: " + JSON.stringify(userData.payload)) // {"whoami": 123456, "email": "john.doe@example.com"} from the enroll() example above
    }).catch(errCode => {
        handleError(errCode)
    })
}
  • Initialization: Initialize the faceIO object with your application's Public ID, just like in the enrollment example.

  • Authentication call: The authenticate() call starts authentication, requests camera access when required, and initiates facial recognition. The locale parameter sets the widget's interaction language.

  • Authentication result: On successful authentication, the promise resolves with a userData object. The userData.facialId is the stable identifier for this user across authentications. Use it as the primary key for looking up the user in your backend. The userData.payload contains the data linked during enrollment, such as {"whoami": 123456, "email": "john.doe@example.com"}.

  • Error handling: Catch authentication failures and implement a handleError() function to handle each returned error code. See the error codes documentation for all possible error codes.

Next Step

The HTML Integration Boilerplate provides a complete reference implementation combining both enroll() and authenticate() in a complete starter template.

The Complete Integration Boilerplate

Complete HTML starter template with the integration flow

The HTML boilerplate combines initialization, enrollment, authentication, and error handling in one reference file. Adapt its account mapping, session handling, recovery path, and user-facing messages before production use. The same code is also available as a GitHub Gist ↗.

Important: Replace Placeholder Values

Replace the placeholder app-public-id with your actual application Public ID when instantiating fio.js. You can find your Public ID in the Application Manager on the FACEIO Console ↗.

The Boilerplate

Implementation Notes

  • Method calls: The example calls enroll() for new-user registration and authenticate() for returning-user authentication. Review their options, return values, and errors in the Integration Guide before adapting the example.
  • Customize the Payload: Modify the payload parameter in the enroll() method to associate your own data with enrolled users. This payload is returned upon future authentication. See the enroll() documentation for details.
  • HTTP Server Required: fio.js requires a running HTTP server to load properly due to security header requirements. You cannot run it from the file system. Deploy the boilerplate to your server's HTML directory and access it via your browser. See our Security Best Practices guide for more info.
  • Store the Facial ID: After successful enrollment, store the returned facialId in your database and link it to the user's account. This ID serves as a lookup key for future authentication.
  • Error handling: The error handler receives the returned error codes. Adapt each message to the UI and recovery flow of your website or web app.

Integration Example Complete

You now have a reference implementation for loading fio.js, calling enroll(), and calling authenticate(). Next, review the application management and production configuration options.

Manage Your Application

Review application settings, events, users, and API access

Use the Application Manager in the FACEIO Console ↗ to review and configure each application after integrating fio.js:

Real-Time Analytics

Review enrollment and authentication activity for the application.

Security Configuration

Configure security settings including PIN code requirements, domain origin filtering, and country code restrictions.

User Management

Remove enrolled Facial IDs to allow users to exercise their right to be forgotten.

Webhook Integration

Set up webhooks for real-time event notifications and backend synchronization.

Facial Index Management

Manage your application's facial index, upgrade storage, migrate to on-premise, or transfer to an S3 bucket.

Widget Customization

Customize the widget's theme, colors, and layout to match your website's design standards.

API Key Management

Retrieve your API keys and monitor your backend API calls and quotas.

Support & Maintenance

Access support channels, open tickets, upgrade/downgrade plans, or manage application lifecycle.

Continue With Your FACEIO Integration

Create an application, test enrollment and authentication, connect the returned Facial ID to your backend account records, and review the security and privacy guidance before rollout.

Create Your FACEIO Application

Open the FACEIO Console, create an application, copy its Public ID, and use this 5-minute guide to connect fio.js to your website or web app.