> ## Documentation Index
> Fetch the complete documentation index at: https://developer.eka.care/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Authenticate users via Aadhaar-based facial recognition

Face Authentication provides a secure and convenient way for users to verify their identity using Aadhaar-based facial recognition. This method allows users to authenticate themselves by scanning a QR code and completing face verification on their mobile device.

## How It Works

The Face Authentication flow consists of three sequential API calls:

**1. Initialize Face Auth**

Call the [Init API](https://developer.eka.care/api-sdk/hie-cm/enrollment/face-auth/face-auth-init.md) to start a face authentication session. This generates a unique transaction ID and a QR code that the user scans with their mobile device.

**2. Poll for Status**

Use the [Capture API](https://developer.eka.care/api-sdk/hie-cm/enrollment/face-auth/face-auth-capture.md) to poll the authentication status. Continue polling until the status changes from `Pending` to `Verified`. This indicates the user has successfully completed face verification on their device.

**3. Retrieve User Information**

Once verified, call the [Verify API](https://developer.eka.care/api-sdk/hie-cm/enrollment/face-auth/face-auth-verify.md) with the user's Aadhaar number to fetch the authenticated user's demographic information. This includes details like name, date of birth, gender, and address.

## Flow Diagram

```mermaid theme={null}
sequenceDiagram
    participant Client
    participant API
    participant User
    participant ABDM

    Client->>API: POST /face-auth/init
    API-->>Client: Transaction ID + QR Code
    Client->>User: Display QR Code
    User->>ABDM: Scan QR & Complete Face Auth

    loop Poll until verified
        Client->>API: POST /face-auth/capture (Transaction ID)
        API-->>Client: Status (Pending/Verified)
    end

    Client->>API: POST /face-auth/verify (Transaction ID + Aadhaar)
    API-->>Client: User Information
    Client->>Client: Proceed to ABHA Creation
```

> **[Init API](https://developer.eka.care/api-sdk/hie-cm/enrollment/face-auth/face-auth-init.md)**
>
> Start a face authentication session

> **[Capture API](https://developer.eka.care/api-sdk/hie-cm/enrollment/face-auth/face-auth-capture.md)**
>
> Poll authentication status

> **[Verify API](https://developer.eka.care/api-sdk/hie-cm/enrollment/face-auth/face-auth-verify.md)**
>
> Retrieve verified user information

## Next Steps

After successfully retrieving user information through face authentication, users can proceed to create their ABHA address using the verified demographic details.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.