# React Native SDK

{% hint style="info" %}
Latest release: **Version 1.1.43**
{% endhint %}

## Getting started

```
$ npm install '@identomat-inc/react-native-identomat'
```

### For iOS:

Run `pod-install` in your iOS directory.

### For Android:

Insert the following lines inside the dependencies block in `android/build.gradle`:

```
    allprojects {
        repositories {
            google ()
            jcenter ()
            maven {
                url = uri("https://gitlab.identomat.com/api/v4/projects/674/packages/maven/")
            }
        }
    }
       ...
```

## Usage

```
     import identomat from '@identomat-inc/react-native-identomat';
// Callback for when the process finishes
    class Callback {
        callback() {
        console.log('finished')
        }
    }

// Callback for back button
class Back {
    callback() {
      console.log('back')
    
    }
  }
    identomat.setCallback(new Callback());
    identomat.setBackButtonCallback(new Back());
    identomat.setBaseUrl(config.baseUrl);
    identomat.setColors(config.colors);
    identomat.setStrings(config.strings);
    identomat.start(config.sessionKey);
```

## Config

```
module.exports = {
  sessionKey : '',
  baseUrl : 'https://widget.identomat.com/api/',
  colors: {
    "background",
    "text_primary",
    "text_secondary",
    "text_placeholder",
    "text_disabled",
    "text_inverse",
    "text_link",
    "primary_color",
    "neutral_color",
    "danger_color",
    "success_color",
    "warning_color",
    "black",
    "white"
  },
  variables:{
    "liveness_retry_icon_size": 200,                  
    "scan_retry_icon_size": 200,
    "camera_deny_icon_size": 200,
    "upload_retry_icon_size": 200,
    "liveness_retry_text_icon_1_size": 24,
    "liveness_retry_text_icon_2_size": 24,
    "liveness_retry_text_icon_3_size": 24,
    "liveness_retry_text_icon_4_size": 24

    "title_medium_size": 16,
    "title_small_size": 14,
    "headline_medium_size": 28,
    "headline_small_size": 24, 
    "body_medium_size": 16,
    "body_small_size": 14

    "title_font":"font-name",
    "headline_font":"font-name",
    "body_font":"font-name",
},
  strings:{
    "en":{
      //ID verification
         
      "identomat_select_document": "Select document",
         
      "identomat_card": "ID card",
      "identomat_card_front_instructions": "Scan FRONT SIDE of ID CARD",
      "identomat_card_front_upload": "Upload FRONT SIDE of ID CARD",
      "identomat_card_rear_instructions": "Scan BACK SIDE of ID CARD",
      "identomat_card_rear_upload": "Upload BACK SIDE of ID CARD",
       
      "identomat_driver_license": "Driver license",
      "identomat_driver_license_front_instructions": "Scan FRONT SIDE of DRIVER LICENSE",
      "identomat_driver_license_front_upload": "Upload FRONT SIDE of DRIVER LICENSE",
      "identomat_driver_license_rear_instructions": "Scan BACK SIDE of DRIVER LICENSE",
      "identomat_driver_license_rear_upload": "Upload BACK SIDE of DRIVER LICENSE",
       
      "identomat_passport": "Passport",
      "identomat_passport_instructions": "Passport photo page",
      "identomat_passport_upload": "Upload passport photo page",
       
      "identomat_residence_permit": "Residence permit",
      "identomat_residence_permit_front_instructions": "Scan FRONT SIDE of RESIDENCE PERMIT",
      "identomat_residence_permit_front_upload": "Upload FRONT SIDE of RESIDENCE PERMIT",
      "identomat_residence_permit_rear_instructions": "Scan BACK SIDE of RESIDENCE PERMIT",
      "identomat_residence_permit_rear_upload": "Upload BACK SIDE of RESIDENCE PERMIT",
       
      "identomat_capture_method_title": "Choose a method",
      "identomat_take_photo": "Take a photo",
      "identomat_upload_file": "Upload a file",
      "identomat_upload_another_file": "Upload another file",
       
      "identomat_upload_instructions_1": "Upload a color image of the entire document",
      "identomat_upload_instructions_2": "JPG or PNG format only",
      "identomat_upload_instructions_3": "Screenshots are not allowed",
      "identomat_choose_file": "Choose a file",
       
      "identomat_verifying": "Verifying...",
      "identomat_uploading": "Uploading...",
       
      "identomat_scan_retry_title": "Capture failed",
      "identomat_scan_retry_instruction": "Please try again in better lighting",
      "identomat_scan_retry_again": "Try again",
      "identomat_upload_success": "Successfully uploaded!",
       
      "identomat_no_document_in_image": "Frame your document",
      "identomat_document_align": "Frame your document",
      "identomat_document_blurry": "Document is blurry",
      "identomat_document_face_blurry": "Face on document is blurry",
      "identomat_document_face_require_brighter": "Low light",
      "identomat_document_face_too_bright": "Avoid direct light",
      "identomat_document_move_away": "Please move document away",
      "identomat_document_move_closer": "Please move document closer",
      "identomat_document_move_down": "Please move document down",
      "identomat_document_move_left": "Please move document to the left",
      "identomat_document_move_right": "Please move document to the right",
      "identomat_document_move_up": "Please move document up",
      "identomat_document_covered": "Document is covered",
      "identomat_document_grayscale": "Document is grayscale",
      "identomat_document_type_mismatch": "Wrong document",
      "identomat_document_not_readable": "Document not readable",
      "identomat_document_face_align": "Document face align",
      "identomat_document_spoofing_detected2": "Document spoofing detected",
      "identomat_document_page_mismatch": "Wrong page",
      "identomat_document_nfc_chip_damaged": "Document NFC chip damaged";
       
       
      //Passive liveness
      "identomat_face_instructions": "Place your FACE within OVAL",
      "identomat_processing": "Processing, please wait";
       
       
      // Active liveness
      "identomat_record_begin_section_1": "Take a neutral expression",
      "identomat_record_begin_section_2": "Smile on this sign",
      "identomat_record_begin_section_3": "Take a neutral expression again",
      "identomat_record_begin_title": "Get ready for your video selfie",
      "identomat_record_instructions": "Place your FACE within OVAL and follow the on-screen instructions",
      "identomat_im_ready": "I'm ready",
      "identomat_neutral_expression": "Neutral face",
      "identomat_smile": "Smile",
       
       
      // Adaptive liveness
      "identomat_passive_record_begin_title": "Get ready for your video selfie",
      "identomat_passive_record_begin_subtitle": "Follow the on-screen instructions when prompted.",
      "identomat_passive_record_begin_subtitle_smile": "When prompted, repeat the facial expression shown on the icons."
      "identomat_passive_record_begin_section_title": "Tips",
      "identomat_passive_record_begin_section_1": "Frame your face",
      "identomat_passive_record_begin_section_2": "Hold still until you see a success notification.",
      "identomat_smile": "Smile",
      "identomat_im_ready": "I'm ready";
       
       
      // Cascading liveness
      "identomat_cascading_instructions": "When prompted, repeat the facial expression shown on the icons:\n\n• Keep neutral face\n• Smile",
      "identomat_cascading_instructions_title": "When prompted, repeat the facial expression shown on the icons:",
      "identomat_cascading_instructions_1": "• Keep neutral face",
      "identomat_cascading_instructions_2": "• Smile",
      "identomat_cascading_button": "Start Liveness Check",
      "identomat_cascading_neutral_face": "Keep neutral face",
      "identomat_cascading_start": "Position your face!",
      "identomat_cascading_smile": "Smile!",
      "identomat_cascading_fail": "Liveness Failed",
      "identomat_cascading_success": "That's it!",
       
      "identomat_liveness_retry_title": "We can't detect your face",
      "identomat_liveness_retry_instruction": "But first, please take a look at the instructions",
      "identomat_liveness_retry_again": "Try again",
      "identomat_liveness_retry_instruction_1": "Make sure to be in a place with good lighting",
      "identomat_liveness_retry_instruction_2": "Make sure your eyes are clearly visible",
      "identomat_liveness_retry_instruction_3": "Remove masks or items covering your face. Eyeglasses are okay",
      "identomat_liveness_retry_instruction_4": "Show only your face, we don’t need to see your ID",
       
      "identomat_lets_try": "Let's try",
       
      "identomat_low_neutral_frequency": "Untimely smile detected",
      "identomat_not_smile": "Smile not detected",
      "identomat_eyes_closed": "Eyes are closed",
      "identomat_face_hold": "Hold still",
      "identomat_no_face": "Face is missing",
      "identomat_face_covered": "Face is covered",
      "identomat_face_align": "Frame your face",
      "identomat_face_away_from_center": "Center your Face",
      "identomat_face_blurry": "Face is blurry",
      "identomat_face_far_away": "Move closer",
      "identomat_face_require_brighter": "Low light",
      "identomat_face_too_bright": "Avoid direct light",
      "identomat_face_too_close": "Move away",
      "identomat_smile_detected": "Get neutral face",
      "identomat_multiple_face": "Keep only your face visible",
       
       
      //Camera permission
      "identomat_camera_deny_title": "Camera access denied",
      "identomat_camera_deny_settings": "Allow access",
      "identomat_camera_deny_cancel": "Cancel process",
       
       
      //Phone number collection & verification
      "identomat_resend_code": "Resend Code",
      "identomat_get_code": "Get Code",
      "identomat_sms_title": "Verify Phone Number",
      "identomat_sms_subtitle": "Enter your correct phone number\nto get verification code",
      "identomat_resend_in": "Resend code in ",
      "identomat_invalid_number": "Please enter valid number",
      "identomat_invalid_code": "The code is not valid",
      "identomat_sms_code_sent": "Enter the 4-digit verification code sent to ",
      "identomat_enter_sms_code": "Enter SMS code",
      "identomat_phone_number_hint": "Phone number",
      "identomat_enter_phone_number": "Enter phone number",
      "identomat_enter_correct_number": "Enter your correct phone number",
      "identomat_confirm": "Confirm",
      "identomat_search": "Search",
      "identomat_verify_enter_code_hint": "Enter code",
       
       
      // Email collection & verification
      "identomat_enter_email_address": "Enter email address",
      "identomat_enter_correct_email": "Enter your correct email address",
      "identomat_enter_valid_email": "Please enter valid email",
      "identomat_email_hint": "Email address",
      "identomat_confirm": "Confirm",
      "identomat_email_check_title": "Verify Email",
      "identomat_email_check_subtitle": "Enter your correct email address\nto get verification code",
      "identomat_get_code": "Get Code",
      "identomat_resend_in": "Resend code in ",
      "identomat_resend_code": "Resend Code",
      "identomat_verify_email_code_title": "Enter code",
      "identomat_verify_email_code_subtitle": "Enter the 6-digit verification code sent to ",
      "identomat_verify_email_invalid_code": "The code is not valid",
      "identomat_verify_enter_code_hint": "Enter code",
       
       
      // Page titles
      "identomat_require_email_header": "",
      "identomat_require_phone_number_header": "",
      "identomat_require_phone_number_check_header": "",
      "identomat_enter_sms_code_header": "",
      "identomat_select_documents_header": "",
      "identomat_capture_methods_header": "",
      "identomat_upload_header": "",
      "identomat_new_liveness_header": "",
      "identomat_camera_access_header": "",
      "identomat_select_country": "Select country",
      "identomat_retry_header": "",
       
       
      //Geolocation
      "identomat_send_location_button": "Send Location",
      "identomat_geolocation_title": "Allow location access",
      "identomat_geolocation_subtitle": "To continue the verification, we need access to your device's location.",
      "identomat_geolocation_success": "Your profile has been verified.",
       
      "identomat_geolocation_deny_title": "Location access denied",
      "identomat_geolocation_deny_subtitle": "We can’t identify you without your location",
      "identomat_geolocation_deny_instruction_1": "You can recover location access through your device settings",
      "identomat_geolocation_deny_instruction_2": "Go to app settings and enable location access for this app",
      "identomat_geolocation_enable_button": "Enable in settings",
      "identomat_geolocation_cancel_button": "Cancel process",
       
       
      //Proof of address
      "identomat_bank_statement": "Bank Statement",
      "identomat_utility_bill": "Utility bill",
      "identomat_vehicle_registration_certificate": "Vehicle registration certificate",
      "identomat_yellow_slip": "Yellow slip",
      "identomat_drivers_license": "Driver's license",
       
      "identomat_upload_bank_statement": "Upload Bank Statement",
      "identomat_upload_utility_bill": "Upload Utility bill",
      "identomat_upload_vehicle_registration_certificate": "Upload Vehicle registration certificate",
      "identomat_upload_yellow_slip": "Upload Yellow slip",
      "identomat_upload_drivers_license": "Upload Driver's license",
      "identomat_upload_document_subtitle": "Make sure that all the information on the photo is visible and easy to read",
       
      "identomat_select_document_title": "Select Document",
      "identomat_proof_of_address_title": "Proof of Address",
      "identomat_proof_of_address_subtitle": "Please upload a document that confirms your residential address.",
      "identomat_uploaded": "Uploaded",
      "identomat_document_errors": "Document Errors",
       
      "identomat_expired_date_was_not_found": "Expiry date was not found in the document",
      "identomat_issued_date_was_not_found": "Issue date was not found in the document",
      "identomat_full_name_does_not_match": "Full name does not match",
      "identomat_full_name_was_not_found": "Full name was not found in the document",
      "identomat_issuing_authority_name_was_not_found": "Issuing authority name was not found in the document",
      "identomat_street_address_was_not_found": "Street address was not found in the document",
      "identomat_document_expired": "Document is expired",
      "identomat_address_not_valid": "Address not valid",
      "identomat_document_date_is_in_the_future": "Document date is in the future",
      "identomat_document_not_matched": "Document not matched",
      "identomat_oversized_file": "Oversized File: Maximum file size is 5MB",
      "identomat_unsupported_file_type": "File Format Mismatch",
      "identomat_too_many_pages": "Too many pages: The maximum is 20",
       
      "identomat_continue": "Continue",
      "identomat_no_connection": "No internet connection"
    }
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.identomat.com/sdks/react-native-sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
