Create Phone Validation (Crear Validación de Teléfono)
Endpoint
POST /v2/phone-validations
Descripción
Este endpoint envía una contraseña de un solo uso (OTP) a un número de teléfono especificado con fines de validación. El OTP puede entregarse a través de SMS o WhatsApp, dependiendo del gateway seleccionado.
Headers
Content-Type
String
Yes
Set to application/json
.
Authorization
String
Yes
Bearer token for API authorization.
Body Parameters
project
String
Yes
Unique identifier for the project.
projectFlow
String
Yes
Identifier for the specific project flow.
countryCode
String
Yes
The country code of the phone number (e.g., +507
).
phone
String
Yes
The phone number to which the OTP will be sent.
validationMethod
String
Yes
The validation method, set to verificationCode
.
type
String
Yes
Type of validation, e.g., login
.
phoneGateway
String
No
Specifies the delivery method: sms
(default) or whatsapp
.
Request
Response
Response Body
client
String
Unique identifier of the client.
project
String
Identifier of the associated project.
projectFlow
String
Identifier of the specific project flow.
status
String
Status of the OTP delivery (e.g., sent
).
countryCode
String
Country code of the phone number.
phone
String
The phone number where the OTP was sent.
phoneGateway
String
Delivery method used (sms
or whatsapp
).
otp
String
OTP sent to the user (hashed for security).
expiresAt
String
Expiration date and time of the OTP.
phoneData.title
String
Custom title provided during phone validation.
type
String
Type of validation (e.g., login
).
redirectUrl
String
URL for redirect after validation.
requires2FA
Boolean
Indicates whether two-factor authentication is required.
ipAddress
String
IP address from which the request was initiated.
language
String
Language for validation communication (e.g., en
).
providerConfirmation
Object
Confirmation details from the provider.
dateTime
String
Date and time of signature validation.
message
String
Certification message.
id
String
Unique ID for the phone validation session.
Notas
Parámetro opcional:
phoneGateway
puede configurarse como "sms" (predeterminado) o "whatsapp" para la entrega del OTP.El OTP expira después de un tiempo predefinido (
expiresAt
).Asegura un manejo seguro de los tokens de autorización y OTPs en tu aplicación.
Se pueden requerir pasos de validación adicionales según
requires2FA
.
Last updated