> For the complete documentation index, see [llms.txt](https://docs.identomat.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.identomat.com/identomat-documentation-ukr/sdks/ios-sdk.md).

# iOS SDK

{% hint style="info" %}
Остання версія: **Version 1.1.171**
{% endhint %}

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td></td><td>Детальний посібник дивіться в нашій документації на <strong>GitLab</strong>.</td><td></td><td></td><td><a href="https://gitlab.identomat.com/world/identomat-ios-framework-spm">https://gitlab.identomat.com/world/identomat-ios-framework-spm</a></td></tr></tbody></table>

## Документація з інтеграції

Бібліотека Identomat надає потік ідентифікації користувача, що складається з різних кроків, які поєднують тип документа та зображення/відео користувача для верифікації.

### Для початку сесії за допомогою API Identomat необхідні такі кроки

{% stepper %}
{% step %}
[Отримати токен сесії та налаштувати сесію](#id-1.-otrimati-token-sesiyi-ta-nalashtuvati-sesiyu)
{% endstep %}

{% step %}
[Отримати екземпляр Identomat SDK](#id-2.-otrimati-ekzemplyar-identomat-sdk-ta-peredati-dani)
{% endstep %}

{% step %}
[Передати токен сесії та обробити колбек](#id-4.-pass-session-token-and-handle-callback)
{% endstep %}

{% step %}
[Запустити Identomat SDK](#id-4.-zapustiti-identomat-sdk)
{% endstep %}

{% step %}
[Передати додаткові змінні](#id-5.-peredati-dodatkovi-zminni)
{% endstep %}
{% endstepper %}

## 1. Отримати токен сесії та налаштувати сесію

Щоб почати сесію, спочатку потрібно отримати `session_token`, викликавши ендпоінт `begin/` та налаштувавши ваш потік верифікації.

> ⚠️ **Примітка:** Цей процес ідентичний для веб- та SDK-інтеграцій.

Повні деталі щодо генерації токена сесії, налаштування кроків та прапорців, а також запуску сесії див. у **Посібнику з веб-інтеграції — ініціалізація сесії**.

Отримавши токен сесії, ви можете продовжити інтеграцію його у ваш потік SDK.

## 2. Отримати екземпляр Identomat SDK та передати дані

Основний клас Identomat SDK — це клас `IdentomatManager`.\
`IdentomatManager` — клас-синглтон в Identomat SDK.

Щоб отримати змінну SDK, ви можете використати такий код:

```swift
let indetomatSdk = IdentomatManager.getInstance();
```

Альтернативно, ви можете щоразу викликати `IdentomatManager.getInstance()`, і він поверне той самий екземпляр Identomat SDK.

## 3. Передати токен сесії та обробити колбек <a href="#id-4.-pass-session-token-and-handle-callback" id="id-4.-pass-session-token-and-handle-callback"></a>

* **sessionToken** – Відповідь від API: тип `String`.

Щоб передати токен сесії, ми використовуємо функцію `setUp`, яку можна викликати так:

```swift
IdentomatManager.getInstance().setUp(token: sessionToken)
```

Останній крок — передати функцію колбека, яка буде запущена після завершення взаємодії користувача з бібліотекою. Для цього використовуйте функцію `.callback`, яка приймає функцію як аргумент:

```swift
IdentomatManager.getInstance().callBack(callback: anyfunc)
//anyfunc is (()->Void)? type
//or
IdentomatManager.getInstance().callBack {
   print("finished")
}

IdentomatManager.getInstance().backButtonCallBack(callback: anyfunc)
/anyfunc is (()->Void)? type
//or
IdentomatManager.getInstance().backButtonCallBack {
   print("finished with back button")
}
```

## 4. Запустити Identomat SDK

Спочатку вам потрібно отримати стартовий view бібліотеки, а потім показати його користувачу.

{% code overflow="wrap" %}

```swift
let identomatView = IdentomatManager.getInstance().getIdentomatView()
identomatView.modalPresentationStyle = .fullScreen
self.present(identomatView, animated: true, completion: nil)  //self is UIViewController type class
```

{% endcode %}

## 5. Передати додаткові змінні

Для налаштування бібліотеки Identomat під застосунок у нас є декілька додаткових функцій:

1. `setColors(colors: [String : String])` - встановлює конкретні кольори 2.1 `setStringsTableName(tableNme : String)` - встановлює рядки за файлом мов 2.2 `setStrings(dict : [String : Any?])` - встановлює конкретні текстові рядки
2. `setVariables(variables : [String : Any?])` - встановлює багато настроюваних змінних
3. `setLogo(view: UIView)` - встановлює індикатор завантаження

Наступні функції у пункті 5 є ЗАСТАРІЛИМИ після версії 0.0.73

5.1 `setTitleFont(fontname: String, size : Int)` - встановлює шрифт заголовка в бібліотеці

5.2 `setHeadlineFont(fontname: String, size : Int)` - встановлює шрифт заголовка в бібліотеці

5.3 `setBodyFont(fontname: String, size : Int )` - встановлює шрифт основного тексту в бібліотеці

5.4 `skipLivenessInstructions()` - пропускає інструкції перевірки живості

5.5 `setLivenessIcons(neutralFace: UIImage?, smileFace: UIImage?)` - встановлює іконки перевірки живості

5.6 `setLivenessRetryIcon(retryIcon: Int?, size : Int)` - встановлює головну іконку панелі повторних спроб перевірки живості, size встановлює розмір іконки

5.7 `setRetryIcon(retryIcon: Int?, size : Int)` - встановлює головну іконку панелі повторних спроб перегляду сканування документа, size встановлює розмір іконки

5.8 `setCameraDenyIcon(cameraDenyIcon: Int?, size : Int)` - встановлює головну іконку панелі повторних спроб перегляду сканування документа

5.9 `hideStatusBar(_ bool : Bool), setStatusBarStyle(style : UIStatusBarStyle)` - налаштування статус-бару

***

### 1. Налаштування кольорів

Використовуйте функцію `setColors`, щоб налаштувати кольори в бібліотеці відповідно до теми застосунку. Передайте словник, що містить відповідні ключі кольорів та їхні відповідні шістнадцяткові значення:

```
"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"
```

Спосіб передачі кольорів у бібліотеку:

```swift
IdentomatManager.getInstance().setColors(colors: colors)
```

### 2. Налаштування рядків <a href="#user-content-2" id="user-content-2"></a>

Щоб налаштувати рядки, які бібліотека відображає в конкретних місцях, ви можете використати дві функції:

1. `setStrings(dict: [String: Any?])`
2. `setStringsTableName(tableNme : String)`

Це два різні методи налаштування рядків.

Функція `setStrings` приймає словник із конкретними ключами для різних мов. Структура виглядає так:

```swift

static var strings : [String : Any?] = [
    "en" : [
        "identomat_agree" : "Yes I Agree",
    ],
    "ru" : [
        "identomat_agree": "Согласен",
    ],
    "es" : [
        "identomat_agree": "Acepto",
    ],
    "ka" : [
        "identomat_agree": "ვეთანხმები",
    ]
]
```

У другому підході ви використовуєте функцію `setStringsTableName(tableName: String)`, де створюєте файл `.strings` у вашому проєкті та локалізуєте його для різних мов, так само як ви робили б для свого застосунку.

Ось як використовувати цей метод:

1. Створіть файл `.strings`, наприклад, `languages.strings`.
2. Локалізуйте файл для різних мов, як зазвичай робите у вашому проєкті.
3. Передайте назву файлу `.strings` (без розширення) до бібліотеки, так:

```swift
setStringsTableName(tableNme : "languages")
```

### 3. Налаштування змінних <a href="#id-3.-customizing-variables" id="id-3.-customizing-variables"></a>

Для будь-якого іншого налаштування ми використовуємо функцію `setVariables(variables: Map<String, Any?>)`, куди ми передаємо мапу пар ключ-значення змінних.

Структура мапи виглядає так:

```swift
static var variables : [String : Any?] = [
    "back_button_icon": UIImage(named: "image_name"),                         -- sets back button icon. type -> UIImage
    "liveness_neutral_icon" : UIImage(named: "liveness_neutral_icon"),        -- sets liveness neutral face icon. type -> UIImage
    "liveness_smile_icon" : UIImage(named: "liveness_smile_icon"),            -- sets liveness smile face icon.       type -> UIImage
    "liveness_neutral_icon_record" : UIImage(named: "liveness_neutral_icon"), -- sets liveness neutral face icon while recording. type -> UIImage
    "liveness_smile_icon_record" : UIImage(named: "liveness_smile_icon"),     -- sets liveness smile face icon  while recording. type -> UIImage

    "liveness_retry_icon" : UIImage(named: "image_name"),           -- sets liveness retry page icon. type -> UIImage
    "liveness_retry_text_icon_1" : UIImage(named: "image_name"),    -- sets liveness retry first instruction icon.  type -> UIImage
    "liveness_retry_text_icon_2" : UIImage(named: "image_name"),    -- sets liveness retry second instruction icon. type -> UIImage
    "liveness_retry_text_icon_3" : UIImage(named: "image_name"),    -- sets liveness retry third instruction icon. type -> UIImage
    "liveness_retry_text_icon_4" : UIImage(named: "image_name"),    -- sets liveness retry fourth instruction icon. type -> UIImage
    "scan_retry_icon" : UIImage(named: "image_name"),               -- sets scan document retry page icon. type -> UIImage
    "camera_deny_icon" : UIImage(named: "image_name"),              -- sets camera deny page icon. type -> UIImage
    "upload_retry_icon" : UIImage(named: "image_name"),             -- sets upload retry page icon. type -> UIImage

    "liveness_retry_icon_size" : 200,     -- sets save icon sizes. type -> int
    "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,
    
    "location_instruction_icon_1",
    "location_instruction_icon_2",
    
    "geolocation_icon",
    "geolocation_success_icon",
    "geolocation_deny_icon",

    "primary_button_width": nil,           -- sets primary button width, if nil its width is maximum
    "primary_button_height": 50,           -- sets primary button height,

    "skip_liveness_instructions" : false,  -- skips liveness instructions. type -> boolean
    "liveness_type" : 1,                   -- chooses liveness icons display type values 1 or 2.  type -> int
    "button_corner_radius" : nil,          -- sets button corner radious, if it's nil button will be round cornered
    "panel_elevation" : 1,                 -- sets panels elevation. type -> int

    "liveness_info_main_icon" or "liveness_info_main_anim",      -- instruction page  
    "liveness_frame_face_icon" or "liveness_frame_face_anim",    -- frame page
    "instruction_smile_icon" or "instruction_smile_anim"         -- Liveness processing page 
    
    Sets  font sizes
    "title_medium_size": 20,
    "title_small_size":
    "headline_medium_size": 20,
    "headline_small_size"
    "body_medium_size": 11
    "body_small_size"
 
    Sets font
    "title_font":"font-name",
    "body_font": "font-name",
    "headline_font":"font-name",

    "default_country_code": "GE"   -- sets default country for country code picker
]
```

### 4. Встановлення користувацького логотипу

`setLogo(view: UIView)` Ця функція використовується для встановлення користувацького логотипу в бібліотеці. Ви можете передати власний користувацький view та відображати на ньому будь-що (анімації, зображення тощо). Цей логотип відображатиметься, коли бібліотека щось обробляє.

***

### Ключі рядків та значення за замовчуванням <a href="#liveness-retry-string-keys" id="liveness-retry-string-keys"></a>

Ключі рядків та їхні значення за замовчуванням для англійської мови (залишено англійською, оскільки це значення за замовчуванням у файлі ресурсів коду):

```ini
 /* 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 success notify";
"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" = "Make sure to remove masks or other items that cover your face. Eyeglasses are okay";
 "identomat_liveness_retry_instruction_4" = "Make sure to only show 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 and 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 and 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: Maximum pages is 20";
  
 "identomat_continue" = "Continue";
 "identomat_no_connection" = "No internet connection";

```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.identomat.com/identomat-documentation-ukr/sdks/ios-sdk.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
