SmartSelfie™ Enrollment and Authentication

Perform SmartSelfie™ Enrollment and Authentication Jobs

SmartSelfie™ Authentication is exposed as a flow which performs the following high level steps:

  1. Displays instructions to the user

  2. Requests camera permissions (if not already granted)

  3. Captures and saves Liveness and Selfie images

  4. Submits the job to the Smile ID API

  5. Delivers the result back to the caller

If you are registering a user for the first time, you should use SmileIDSmartSelfieEnrollment React Native component

 <SmileIDSmartSelfieEnrollmentView
  userId: "random-user-id/generated-user-id",
  onResult={(event) => {
    setResult(event.nativeEvent.result);
  }}
  />

If you are authenticating an existing you should use SmileIDSmartSelfieAuthenticationView

 <SmileIDSmartSelfieAuthenticationView
  userId: "random-user-id/generated-user-id",
  onResult={(event) => {
    setResult(event.nativeEvent.result);
  }}
  />

React Native component

On onResult, you will receive a JSON string following the structure:

{
  "selfieFile":  "<path to selfie file>",
  "documentFrontFile": "<path to document front file>",
  "documentBackFile":  null | "<path to document back file>",
  "jobStatusResponse": {
    "timestamp": "...",
    "jobComplete": true | false,
    "jobSuccess":  true | false,
    "code": "",
    "result": null | {
      "actions": {},
      "resultCode": "...",
      "resultText": "...",
      "smileJobId": "...",
      "partnerParams": {},
      "country": null | "...",
      "idType": null | "...",
      "idNumber": null | "...",
      "fullName":null | "...",
      "dob": null | "...",
      "gender": null | "...",
      "expirationDate": null | "...",
      "documentImageBase64":null | "...",
      "phoneNumber": null | "...",
      "phoneNumber2": null | "...",
      "address": null | "..."
    },
    "history": null | [],
    "imageLinks":  null | {
      "selfieImageUrl": "...",
      "error": "..."
    }
  }
}

Last updated