# Web Verification Flow

This service provides a fully web-based verification experience that allows you to launch customized identity verification flows through a single API call. You can combine or enable different verification modules based on your needs, including **Egyptian National ID OCR, face match, liveness detection, email OTP, and phone OTP**.

To get started, please **contact us to define and configure your required verification flow**. Once the flow is set up and the **API key is shared**, you can use the API to generate a secure verification link. End users can open this link to complete the requested verification steps through a seamless web experience, without the need to integrate a mobile SDK.

## <mark style="color:blue;">Integration Workflow</mark>

#### <mark style="color:blue;">Step 1: Generate a verification link from the backend</mark>

<mark style="color:green;">`POST`</mark> `https://verify.valifysolutions.com/api/link/v1/request/?lang=en`

#### Headers

| Name                                                   | Type   | Description                                                          |
| ------------------------------------------------------ | ------ | -------------------------------------------------------------------- |
| Content-Type<mark style="color:red;">\*</mark>         | string | application/json                                                     |
| **X-Valify-Api-Key**<mark style="color:red;">\*</mark> | string | API Key for backend-to-backend API communications provided by Valify |

#### Request&#x20;

| Name                                            | Type      | Description                                                                    |
| ----------------------------------------------- | --------- | ------------------------------------------------------------------------------ |
| return\_url<mark style="color:red;">\*</mark>   | string    | The URL to redirect to after verification is complete.                         |
| reference\_id<mark style="color:red;">\*</mark> | string    | <p>The unique identifier for this end user in your database.</p><p></p>        |
| expires\_at<mark style="color:red;">\*</mark>   | date-time | Configurable expiration date for the link **(eg. "2026-01-14T07:57:54.972Z")** |
| flow **(optional)**                             | UUID      | Valify-provided, optional unless multiple flows are configured.                |
|                                                 |           |                                                                                |

#### Status Codes

{% tabs %}
{% tab title="✅200 Successful" %}

```python
{
    "session_token": "e5e6a438-8cdf-429e-ad80-f60480eed874",
    "redirect_url ": "https://verify.valifysolutions.com/?token=e5e6a438-8cdf-429e-ad80-f60480eed874"
}
```

{% endtab %}

{% tab title="400 Missing input data" %}

```python
{
    "message": "Bad Request – invalid request received (e.g. missing Bundle key, required parameters or invalid json) | Make sure all the required parameters are included"
}
```

{% endtab %}

{% tab title="401 Invalid bundle key" %}

```python
{
    "message": "Unauthorized – your Bundle key is invalid"
}
```

{% endtab %}

{% tab title="403 Access token error" %}

```python
{
    "message": "Forbidden – specified access_token could not be found"
}
```

{% endtab %}

{% tab title="404 Check the endpoint" %}

```python
{
    "message": "Not Found"
}
```

{% endtab %}

{% tab title="415 The format should be base64" %}

```python
{
    "message": "Unsupported Media Type"
}
```

{% endtab %}

{% tab title="422 Check Valify error codes" %}

```python
{
    "message": "<error-description>",
    "error_code": <valify-error-code>
}
```

{% endtab %}

{% tab title="500: Internal Server Error" %}

```python
{
    "message": "Internal Server Error"
}
```

{% endtab %}

{% tab title="500 Contact us" %}

```python
{
    "message": "Internal Server Error"
}
```

{% endtab %}
{% endtabs %}

***

## Integration&#x20;

{% tabs %}
{% tab title="🚀Postman" %}
{% file src="/files/vDXHihlln6bGZZFjj2fY" %}
{% endtab %}
{% endtabs %}

#### <mark style="color:blue;">Step 2: Customer Verification Page (Redirection Target)</mark>

**Purpose:**&#x20;

This is the page hosted by Valify where the customer lands after the Integrator redirects them to the redirect\_url.&#x20;

**Behavior:**&#x20;

* The customer uploads their card details or required documents.&#x20;
* Valify handles the verification process (card validation, checks, etc.).&#x20;
* Once completed:&#x20;
  * Valify redirects the customer back to the return\_url provided by client/partner in the initiation request.&#x20;
  * Valify also triggers the webhook (configured at the account level in Valify) with the verification result.

**Example Flow:**

1. Customer visits: <https://verify.valifysolutions.com/?token=abc123>.
2. They see an upload form and submit their card/document.
3. Verification is processed on Valify’s side.
4. Once done:
   1. Valify redirects the customer back to the return\_url.
   2. Valify calls the client/partner webhook with the verification result.


---

# 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://valify.gitbook.io/documentation/kyc/kyc-features/egy-nid-ocr.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.
