> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.vlenseg.com/llms.txt.
> For full documentation content, see https://docs.vlenseg.com/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.vlenseg.com/_mcp/server.

# Re-validate liveness after location change

POST https://api.vlenseg.com/api/BusinessRequest/CustomerSign/StepReValidateLiveness
Content-Type: application/json

Required when the user's current location is more than 80 km from their last active device location. Submit new liveness images to re-establish the user's identity.

Use the **same `transactionId`** as the original KYC verification. After this step succeeds, call `StepRequestOtp` again.


Reference: https://docs.vlenseg.com/api-reference/vlens-api/business-request/customer-sign-step-re-validate-liveness

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: example-openapi
  version: 1.0.0
paths:
  /api/BusinessRequest/CustomerSign/StepReValidateLiveness:
    post:
      operationId: customer-sign-step-re-validate-liveness
      summary: Re-validate liveness after location change
      description: >
        Required when the user's current location is more than 80 km from their
        last active device location. Submit new liveness images to re-establish
        the user's identity.


        Use the **same `transactionId`** as the original KYC verification. After
        this step succeeds, call `StepRequestOtp` again.
      tags:
        - subpackage_businessRequest
      parameters:
        - name: ApiKey
          in: header
          description: >-
            Static API key issued to your tenant. Obtain from the Vlens
            dashboard.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Liveness re-validated. Proceed to `StepRequestOtp`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiOutputString'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerSignRevalidateLivenessRequest'
servers:
  - url: https://api.vlenseg.com
components:
  schemas:
    GeoLocation:
      type: object
      properties:
        latitude:
          type: number
          format: double
        longitude:
          type: number
          format: double
      required:
        - latitude
        - longitude
      description: Geographic coordinates of the user's device.
      title: GeoLocation
    ScanTransactionLivenessInput:
      type: object
      properties:
        image:
          type: string
          description: Base64-encoded ID front image.
        face_1:
          type: string
          description: Base64-encoded face image, capture 1.
        face_2:
          type: string
          description: Base64-encoded face image, capture 2.
        face_3:
          type: string
          description: Base64-encoded face image, capture 3.
        id_front_image:
          type:
            - string
            - 'null'
        name_check_value:
          type:
            - string
            - 'null'
        transaction_id:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            Transaction ID from the ID front/back steps. Link liveness to the
            same transaction.
        client_transaction_id:
          type:
            - string
            - 'null'
        request_id:
          type:
            - string
            - 'null'
        country:
          type:
            - string
            - 'null'
        getExtractedData:
          type: boolean
          default: false
      required:
        - image
        - face_1
        - face_2
        - face_3
      description: >
        Input for liveness detection. Three face images must be captured within
        0.5 seconds of each other.

        Compress each image to under 500 KB for best performance.
      title: ScanTransactionLivenessInput
    CustomerSignRevalidateLivenessRequest:
      type: object
      properties:
        requestId:
          type: string
          format: uuid
          description: The business request ID being activated.
        contractStorageId:
          type:
            - string
            - 'null'
          format: uuid
        transactionId:
          type:
            - string
            - 'null'
          format: uuid
          description: The KYC transaction ID associated with this request.
        geoLocation:
          $ref: '#/components/schemas/GeoLocation'
        userDeviceUtcTime:
          type: string
          format: date-time
          description: UTC timestamp from the user's device.
        paymentGateway:
          type:
            - string
            - 'null'
          description: Payment gateway name (e.g., `fawry`, `kashier`).
        scanTransaction:
          $ref: '#/components/schemas/ScanTransactionLivenessInput'
      required:
        - geoLocation
        - userDeviceUtcTime
        - scanTransaction
      description: Base fields required by all customer signing step endpoints.
      title: CustomerSignRevalidateLivenessRequest
    ApiOutputString:
      type: object
      properties:
        data:
          type:
            - string
            - 'null'
        error_code:
          type:
            - integer
            - 'null'
        error_message:
          type:
            - string
            - 'null'
        error_descriptions:
          oneOf:
            - description: Any type
            - type: 'null'
      title: ApiOutputString
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: ApiKey
      description: Static API key issued to your tenant. Obtain from the Vlens dashboard.
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        Short-lived JWT. Obtain via:
        - `/api/credentials/Login` for admin / service tokens
        - `/api/DigitalIdentity/Register` or login for end-user tokens

```

## SDK Code Examples

```python
import requests

url = "https://api.vlenseg.com/api/BusinessRequest/CustomerSign/StepReValidateLiveness"

payload = {
    "geoLocation": {
        "latitude": 29.9765,
        "longitude": 31.1313
    },
    "userDeviceUtcTime": "2024-04-20T14:45:00Z",
    "scanTransaction": {
        "image": "SGVsbG8gV29ybGQ=",
        "face_1": "SGVsbG8gV29ybGQ=",
        "face_2": "SGVsbG8gV29ybGQ=",
        "face_3": "SGVsbG8gV29ybGQ="
    }
}
headers = {
    "ApiKey": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.vlenseg.com/api/BusinessRequest/CustomerSign/StepReValidateLiveness';
const options = {
  method: 'POST',
  headers: {ApiKey: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"geoLocation":{"latitude":29.9765,"longitude":31.1313},"userDeviceUtcTime":"2024-04-20T14:45:00Z","scanTransaction":{"image":"SGVsbG8gV29ybGQ=","face_1":"SGVsbG8gV29ybGQ=","face_2":"SGVsbG8gV29ybGQ=","face_3":"SGVsbG8gV29ybGQ="}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.vlenseg.com/api/BusinessRequest/CustomerSign/StepReValidateLiveness"

	payload := strings.NewReader("{\n  \"geoLocation\": {\n    \"latitude\": 29.9765,\n    \"longitude\": 31.1313\n  },\n  \"userDeviceUtcTime\": \"2024-04-20T14:45:00Z\",\n  \"scanTransaction\": {\n    \"image\": \"SGVsbG8gV29ybGQ=\",\n    \"face_1\": \"SGVsbG8gV29ybGQ=\",\n    \"face_2\": \"SGVsbG8gV29ybGQ=\",\n    \"face_3\": \"SGVsbG8gV29ybGQ=\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("ApiKey", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.vlenseg.com/api/BusinessRequest/CustomerSign/StepReValidateLiveness")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["ApiKey"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"geoLocation\": {\n    \"latitude\": 29.9765,\n    \"longitude\": 31.1313\n  },\n  \"userDeviceUtcTime\": \"2024-04-20T14:45:00Z\",\n  \"scanTransaction\": {\n    \"image\": \"SGVsbG8gV29ybGQ=\",\n    \"face_1\": \"SGVsbG8gV29ybGQ=\",\n    \"face_2\": \"SGVsbG8gV29ybGQ=\",\n    \"face_3\": \"SGVsbG8gV29ybGQ=\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.vlenseg.com/api/BusinessRequest/CustomerSign/StepReValidateLiveness")
  .header("ApiKey", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"geoLocation\": {\n    \"latitude\": 29.9765,\n    \"longitude\": 31.1313\n  },\n  \"userDeviceUtcTime\": \"2024-04-20T14:45:00Z\",\n  \"scanTransaction\": {\n    \"image\": \"SGVsbG8gV29ybGQ=\",\n    \"face_1\": \"SGVsbG8gV29ybGQ=\",\n    \"face_2\": \"SGVsbG8gV29ybGQ=\",\n    \"face_3\": \"SGVsbG8gV29ybGQ=\"\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.vlenseg.com/api/BusinessRequest/CustomerSign/StepReValidateLiveness', [
  'body' => '{
  "geoLocation": {
    "latitude": 29.9765,
    "longitude": 31.1313
  },
  "userDeviceUtcTime": "2024-04-20T14:45:00Z",
  "scanTransaction": {
    "image": "SGVsbG8gV29ybGQ=",
    "face_1": "SGVsbG8gV29ybGQ=",
    "face_2": "SGVsbG8gV29ybGQ=",
    "face_3": "SGVsbG8gV29ybGQ="
  }
}',
  'headers' => [
    'ApiKey' => '<apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.vlenseg.com/api/BusinessRequest/CustomerSign/StepReValidateLiveness");
var request = new RestRequest(Method.POST);
request.AddHeader("ApiKey", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"geoLocation\": {\n    \"latitude\": 29.9765,\n    \"longitude\": 31.1313\n  },\n  \"userDeviceUtcTime\": \"2024-04-20T14:45:00Z\",\n  \"scanTransaction\": {\n    \"image\": \"SGVsbG8gV29ybGQ=\",\n    \"face_1\": \"SGVsbG8gV29ybGQ=\",\n    \"face_2\": \"SGVsbG8gV29ybGQ=\",\n    \"face_3\": \"SGVsbG8gV29ybGQ=\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "ApiKey": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "geoLocation": [
    "latitude": 29.9765,
    "longitude": 31.1313
  ],
  "userDeviceUtcTime": "2024-04-20T14:45:00Z",
  "scanTransaction": [
    "image": "SGVsbG8gV29ybGQ=",
    "face_1": "SGVsbG8gV29ybGQ=",
    "face_2": "SGVsbG8gV29ybGQ=",
    "face_3": "SGVsbG8gV29ybGQ="
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.vlenseg.com/api/BusinessRequest/CustomerSign/StepReValidateLiveness")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```