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.
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:
How FACEIO Works
Understand how FACEIO adds facial enrollment and authentication to a website or web application.
Integration Checklist
Review the essential steps needed for a smooth integration of fio.js on your website or web application.
Create Your Application
Set up your first FACEIO application, choose a facial recognition engine, configure security settings, and customize the widget appearance.
Add fio.js Library
Integrate the fio.js library on your website and initialize it with your application's Public ID.
enroll() and authenticate()
Review the fio.js methods used to enroll new users and authenticate returning users.
Enroll Your First User
Implement user enrollment and authentication with working code examples, then adapt the result to your account and session logic.
Integration Boilerplate
Use an HTML boilerplate containing both enrollment and authentication examples.
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.jsto your frontend and initialize it with the application's Public ID. New users register throughenroll(), while returning users sign in throughauthenticate()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.jsJavaScript 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:
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.
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.
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.
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.
Additional Resources
Create Your Application
Set up your FACEIO application on the Console
-
Before implementing
fio.jsand 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
payloadparameter. 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:
Connect to the FACEIO Console ↗.
On the Console main view, click New Application. This will launch the Application Wizard.
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.
Click to explore the Application Wizard
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.
The snippet above loads fio.js asynchronously. A basic HTML page can initialize the library as follows:
Typical HTML page with fio.js imported
-
See the HTML Integration Boilerplate for a complete template that you can copy, adapt, and test on your server.
-
Always load
fio.jsdirectly 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
Before you continue, your Public ID is available in the Application Manager on the FACEIO Console ↗. Make sure you've:
- Created a FACEIO application, selected a Facial Recognition Engine, and activated it via the FACEIO Console ↗
- Reviewed Security Options (PIN requirements, domain restrictions, etc.) in the Application Manager ↗ and our Security Best Practices guide
- Reviewed Privacy Recommendations in our Privacy Best Practices guide, including how to handle Unique Facial IDs
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()
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 initializedfaceIOobject 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 aslocalefor the interaction language,permissionTimeoutfor the camera access wait time, and most importantlypayload, 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 auserInfoobject when enrollment succeeds. It includes the user's Facial ID, enrollment timestamp, and thedetails.ageanddetails.genderestimates. 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_REFUSEDorfioErrCode.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 initializedfaceIOobject 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, includingpermissionTimeoutfor camera access wait time,localefor the interaction language, and other options, all documented here. -
authenticate()returns a Promise that resolves with auserDataobject upon successful identification. Key properties include:payload(the data you linked during enrollment) andfacialId(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
-
Initialization: Instantiate the
faceIOobject 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. Thepayloadparameter 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
userInfoobject containing the unique Facial ID, enrollment timestamp, and thedetails.genderanddetails.ageestimates. 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
-
Initialization: Initialize the
faceIOobject 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. Thelocaleparameter sets the widget's interaction language. -
Authentication result: On successful authentication, the promise resolves with a
userDataobject. TheuserData.facialIdis the stable identifier for this user across authentications. Use it as the primary key for looking up the user in your backend. TheuserData.payloadcontains 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 andauthenticate()for returning-user authentication. Review their options, return values, and errors in the Integration Guide before adapting the example. -
Customize the Payload: Modify the
payloadparameter in theenroll()method to associate your own data with enrolled users. This payload is returned upon future authentication. See theenroll()documentation for details. - HTTP Server Required:
fio.jsrequires 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
facialIdin 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.
Essential Resources & Guides
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.