{ OTP Service API }
Accesos seguros, rápidos y sencillos
Multicanal · Multiproveedor
Genera, entrega y verifica OTP con control por plantilla (expiración, intentos, diccionario de caracteres y rate limiting). Integración en minutos.
Flujo en 2 pasos
Generación y verificación. Todo lo necesario para empezar a operar hoy.
1) /otp/send
Envía templateId, channel y destination. Devuelve otpId y correlationId para trazabilidad completa.
2) /otp/verify
Valida el código con los mismos parámetros del envío. Respuesta simple: { "valid": true | false }.
Integra en minutos
Solo necesitas un token de acceso y dos llamadas. Copia y prueba.
# 1) Generar OTP
curl --request POST \
--url https://otp.algoris.click/otp/send \
--header 'Authorization: Bearer <access_token>' \
--header 'Content-Type: application/json' \
--data '{
"templateId": 2,
"channel": "SMS",
"phone": "+525512345678",
"email": "user@example.com",
"metadata": {
"locale": "sp-MX",
"clientReference": "1234",
"ip": "127.0.0.1",
"userAgent": "browser"
}
}'
# 2) Verificar OTP
curl --request POST \
--url https://otp.algoris.click/otp/verify \
--header 'Authorization: Bearer <access_token>' \
--header 'Content-Type: application/json' \
--data '{
"otpId": "5bd790e7-3194-4afd-92f6-48d2fff28ec2",
"code": "4LG0R1"
}'
import requests
BASE_URL = "https://otp.algoris.click"
TOKEN = "<access_token>"
headers = {
"Authorization": f"Bearer {TOKEN}",
"Content-Type": "application/json"
}
# 1) Generar OTP
send_response = requests.post(f"{BASE_URL}/otp/send", headers=headers, json={
"templateId": 2,
"channel": "SMS",
"phone": "+525512345678",
"email": "user@example.com",
"metadata": {
"locale": "sp-MX",
"clientReference": "1234",
"ip": "127.0.0.1",
"userAgent": "browser"
}
})
otp_id = send_response.json()["otpId"]
# 2) Verificar OTP
verify_response = requests.post(f"{BASE_URL}/otp/verify", headers=headers, json={
"otpId": otp_id,
"code": "4LG0R1"
})
print(verify_response.json()) # {"valid": true}
const BASE_URL = "https://otp.algoris.click";
const TOKEN = "<access_token>";
const headers = {
"Authorization": `Bearer ${TOKEN}`,
"Content-Type": "application/json"
};
// 1) Generar OTP
const sendRes = await fetch(`${BASE_URL}/otp/send`, {
method: "POST",
headers,
body: JSON.stringify({
templateId: 2,
channel: "SMS",
phone: "+525512345678",
email: "user@example.com",
metadata: {
locale: "sp-MX",
clientReference: "1234",
ip: "127.0.0.1",
userAgent: "browser"
}
})
});
const { otpId } = await sendRes.json();
// 2) Verificar OTP
const verifyRes = await fetch(`${BASE_URL}/otp/verify`, {
method: "POST",
headers,
body: JSON.stringify({ otpId, code: "4LG0R1" })
});
const result = await verifyRes.json();
console.log(result); // { valid: true }
import java.net.http.*;
import java.net.URI;
public class OtpService {
private static final String BASE_URL = "https://otp.algoris.click";
private static final String TOKEN = "<access_token>";
private static final HttpClient client = HttpClient.newHttpClient();
public static void main(String[] args) throws Exception {
// 1) Generar OTP
String sendBody = """
{
"templateId": 2,
"channel": "SMS",
"phone": "+525512345678",
"email": "user@example.com",
"metadata": {
"locale": "sp-MX",
"clientReference": "1234",
"ip": "127.0.0.1",
"userAgent": "browser"
}
}""";
HttpRequest sendReq = HttpRequest.newBuilder()
.uri(URI.create(BASE_URL + "/otp/send"))
.header("Authorization", "Bearer " + TOKEN)
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(sendBody))
.build();
HttpResponse<String> sendRes = client.send(sendReq,
HttpResponse.BodyHandlers.ofString());
System.out.println(sendRes.body());
// 2) Verificar OTP
String verifyBody = """
{
"otpId": "5bd790e7-3194-4afd-92f6-48d2fff28ec2",
"code": "4LG0R1"
}""";
HttpRequest verifyReq = HttpRequest.newBuilder()
.uri(URI.create(BASE_URL + "/otp/verify"))
.header("Authorization", "Bearer " + TOKEN)
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(verifyBody))
.build();
HttpResponse<String> verifyRes = client.send(verifyReq,
HttpResponse.BodyHandlers.ofString());
System.out.println(verifyRes.body()); // {"valid": true}
}
}
using System.Net.Http;
using System.Text;
using System.Text.Json;
var client = new HttpClient();
var baseUrl = "https://otp.algoris.click";
var token = "<access_token>";
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {token}");
// 1) Generar OTP
var sendPayload = new {
templateId = 2,
channel = "SMS",
phone = "+525512345678",
email = "user@example.com",
metadata = new {
locale = "sp-MX",
clientReference = "1234",
ip = "127.0.0.1",
userAgent = "browser"
}
};
var sendContent = new StringContent(
JsonSerializer.Serialize(sendPayload),
Encoding.UTF8, "application/json");
var sendRes = await client.PostAsync($"{baseUrl}/otp/send", sendContent);
var sendJson = await sendRes.Content.ReadAsStringAsync();
Console.WriteLine(sendJson);
// 2) Verificar OTP
var verifyPayload = new {
otpId = "5bd790e7-3194-4afd-92f6-48d2fff28ec2",
code = "4LG0R1"
};
var verifyContent = new StringContent(
JsonSerializer.Serialize(verifyPayload),
Encoding.UTF8, "application/json");
var verifyRes = await client.PostAsync($"{baseUrl}/otp/verify", verifyContent);
var result = await verifyRes.Content.ReadAsStringAsync();
Console.WriteLine(result); // {"valid": true}Visibilidad operativa
para misión crítica
No solo enviamos OTP. Tu equipo puede monitorear volumen, entrega, validación, reenvíos, rechazos y estabilidad por canal desde un dashboard centralizado.
OTPs solicitados
+12.4% vs mes anteriorOTPs generados
96.4% tasa de entregaVerificaciones exitosas
82.9% success rateRechazos / expirados
6.3% del totalDesempeño por canal
Comparativo de envío, entrega y reenvío entre SMS, WhatsApp y Email.
Distribución de rechazos
Motivos principales de fallo o no conclusión del flujo OTP.
Multicanal y
Multi-Proveedor
Arquitectura flexible que permite enviar OTP por múltiples canales con diferentes proveedores, incluyendo los que ya usa tu empresa.
Un solo endpoint
Independientemente del proveedor, la integración del cliente siempre es la misma. El backend decide el canal y proveedor de entrega.
Integración inmediata
OTP Service puede entregar los códigos utilizando los canales de mensajería integrados en la plataforma. Úsanos hoy mismo.
Tus proveedores
Si ya tienes contratos con proveedores de SMS, Email o WhatsApp, intégralos directamente al servicio OTP manteniendo tu infraestructura.
Integración simple, operación flexible
Tu sistema se integra una sola vez. La plataforma gestiona autenticación, plantillas, verificación y trazabilidad.
App, backend o portal
API + plantillas + auditoría
Control total del acceso
Autenticación sólida, reglas por plantilla y trazabilidad operativa para entornos regulados.
Dashboard operativo
Lectura inmediata de volumen, entregabilidad, reenvíos y rechazos por canal.
Plantillas configurables
Longitud, vigencia, diccionario de caracteres y máximo de intentos definidos por plantilla.
PCI-DSS, ISO 27001
Arquitectura compatible con PCI-DSS. Alineado con NIST y OWASP.
Anti-spam y trazabilidad
Protección en ventanas de tiempo. Trazabilidad punta a punta para auditoría y debugging.
¿Listo para integrar OTP Service?
Cuéntanos sobre tu caso de uso y te ayudamos a definir la mejor configuración para tu plataforma.