Obtener sesión biométrica actual
curl --request GET \
--url http://api.gu1.ai/api/kyc/biometric/entities/{entityId}/current \
--header 'Authorization: Bearer <token>'import requests
url = "http://api.gu1.ai/api/kyc/biometric/entities/{entityId}/current"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://api.gu1.ai/api/kyc/biometric/entities/{entityId}/current', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://api.gu1.ai/api/kyc/biometric/entities/{entityId}/current",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://api.gu1.ai/api/kyc/biometric/entities/{entityId}/current"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://api.gu1.ai/api/kyc/biometric/entities/{entityId}/current")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/api/kyc/biometric/entities/{entityId}/current")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyBiométrico
Obtener sesión biométrica actual
Recupera la sesión biométrica embebida más reciente de una entidad — mismo patrón que GET /api/kyc/entities/:entityId/current para validaciones KYC.
GET
/
api
/
kyc
/
biometric
/
entities
/
{entityId}
/
current
Obtener sesión biométrica actual
curl --request GET \
--url http://api.gu1.ai/api/kyc/biometric/entities/{entityId}/current \
--header 'Authorization: Bearer <token>'import requests
url = "http://api.gu1.ai/api/kyc/biometric/entities/{entityId}/current"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://api.gu1.ai/api/kyc/biometric/entities/{entityId}/current', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://api.gu1.ai/api/kyc/biometric/entities/{entityId}/current",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://api.gu1.ai/api/kyc/biometric/entities/{entityId}/current"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://api.gu1.ai/api/kyc/biometric/entities/{entityId}/current")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/api/kyc/biometric/entities/{entityId}/current")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyDescripción general
Este endpoint devuelve la sesión biométrica más reciente de una entidad (ordenada porcreatedAt), sin importar el estado: pending, in_progress, approved, rejected, etc.
Es el equivalente biométrico de GET /api/kyc/entities/{entityId}/current para validaciones KYC.
Si la entidad nunca tuvo una sesión biométrica, la API responde
200 con null (no 404), igual que el endpoint KYC actual.Cuándo usarlo
- Recuperar una sesión pendiente para embeber de nuevo el
sessionUrlo cancelarla - Consultar el estado del último intento biométrico (
status,rejectionCode,decision) - Resolver
ACTIVE_SESSION_EXISTSal crear una nueva sesión: elidde la sesión activa está en este endpoint (o enactiveSessionIddel error 409)
Solicitud
GET https://api.gu1.ai/api/kyc/biometric/entities/{entityId}/current
Encabezados
{
"Authorization": "Bearer TU_API_KEY",
"X-Organization-ID": "uuid-de-tu-organizacion"
}
Respuesta
200 OK — sesión encontrada
{
"id": "7618e10c-b1b1-408b-b361-1901077ced73",
"entityId": "c16b457b-500a-4250-aefe-6d69bdf71fb2",
"organizationId": "org-uuid",
"status": "pending",
"mode": "face_match",
"sessionUrl": "https://kyc.example.com/session/abc123",
"hostedSessionId": "e291f904-9c3f-490e-a51e-73434a14ba9a",
"iframeAllow": "camera; microphone; fullscreen; autoplay; encrypted-media",
"rejectionCode": null,
"rejectionMessage": null,
"createdAt": "2026-06-19T14:40:00.000Z",
"updatedAt": "2026-06-19T14:40:00.000Z",
"completedAt": null
}
200 OK — sin sesiones
null
Flujo recomendado
POST /api/kyc/biometric/sessions→ guardaridysessionUrl- Embeber
sessionUrlen iframe - Polling:
GET /api/kyc/biometric/entities/{entityId}/currentoGET /api/kyc/biometric/sessions/{id} - Si necesitás reiniciar:
POST /api/kyc/biometric/sessions/{id}/cancel(solopending/in_progress)
Diferencia con currentSessionId en el listado
GET /api/kyc/biometric/sessions?entityId=... incluye currentSessionId: es la última sesión approved (verificación biométrica vigente). Este endpoint /current devuelve la última sesión creada, que puede estar pending.
| Campo / endpoint | Qué representa |
|---|---|
GET .../entities/:entityId/current | Última sesión creada (cualquier estado) |
currentSessionId en listado | Última sesión aprobada |
Error al crear segunda sesión
Si intentás crear otra sesión con una activa (pending / in_progress), recibís 409 ACTIVE_SESSION_EXISTS con el ID bloqueante:
{
"error": "ACTIVE_SESSION_EXISTS",
"message": "Cannot create new biometric session. There is already a pending session for this entity. Please cancel or complete the existing session first.",
"activeSessionId": "7618e10c-b1b1-408b-b361-1901077ced73"
}
POST /api/kyc/biometric/sessions/{activeSessionId}/cancel y volvé a crear.
Endpoints relacionados
- Sesión biométrica embebida — crear sesión
- Eventos webhook biométricos
Was this page helpful?