RCS OTP with verified code and Android auto-fill

The problem with SMS OTPs

SMS OTPs have become the default second authentication factor — bank logins, e-commerce checkouts, account changes, payment confirmations. They are ubiquitous because they work on any phone, require no app and most users understand them. But SMS OTPs have documented security weaknesses that are being exploited at increasing scale:

  • Phishing & social engineering: Attackers call or text victims pretending to be their bank, asking them to "read the code" they just received. Since SMS shows no verified identity, victims cannot distinguish a genuine bank OTP from one triggered by an attacker who already has their credentials.
  • SIM swapping: Attackers convince mobile operators to transfer the victim's number to a SIM they control, intercepting all SMS.
  • SS7 vulnerabilities: The underlying telephone signalling protocol has known flaws that allow sophisticated attackers to intercept SMS messages.
  • Malware: Android malware can read SMS messages and automatically forward OTP codes to attackers.
Security context: NIST has discouraged SMS as a secure authentication factor for federal systems. Pressure to migrate to safer alternatives is growing globally.

How RCS addresses these vulnerabilities

Verified sender identity — the key improvement

The most important security improvement RCS brings to OTP delivery is verified sender identity. When a legitimate service sends an OTP via RCS, the recipient sees: the official brand name, the service logo in high resolution, and a verified business badge — all before the message is even opened. This is cryptographically guaranteed — an attacker cannot create a fake RCS sender profile that impersonates a verified brand.

Android auto-fill support

RCS OTPs support Android's auto-fill feature. When the message is correctly formatted, Android automatically detects the OTP code and suggests it as an option in the authentication input field — the user taps once and the code is entered. This is both a UX improvement and a security improvement, since it reduces the risk of users copying codes to phishing sites.

# OTP message format compatible with Android auto-fill Your [MyBrand] verification code is: 847291 This code expires in 10 minutes. Do not share it with anyone. 847291 is your [MyBrand] code

Implementation example

const sendOTP = async (phone, code) => { await fetch('https://api.sms.es/v1/rcs/messages', { method: 'POST', headers: { 'Authorization': `Bearer ${process.env.RCS_API_KEY}` }, body: JSON.stringify({ to: phone, from: 'MyBrand', rcs: { text: `Your MyBrand code is: ${code}\n\nValid 10 min. Never share.\n\n${code} is your MyBrand code` }, fallback: { sms: { text: `[MyBrand] Your code is ${code}. Valid 10 min.` } } }) }); };

RCS OTP vs other auth methods

  • More secure than SMS OTP: Verified sender, device binding, auto-fill — significant security improvements.
  • More accessible than authenticator apps: No app download required. Works on any Android with Google Messages, and iOS 18+.
  • Comparable UX to WhatsApp OTP: Similar experience but without requiring WhatsApp and without routing through Meta's infrastructure.
  • Less secure than FIDO2/WebAuthn: Hardware or biometric-based authentication (passkeys) remains the gold standard for highest-risk operations. RCS OTP is a significant improvement over SMS but not appropriate for the highest-risk transactions.
OTP RCS con código verificado y auto-relleno Android

El problema con los OTPs por SMS

Los OTPs por SMS se han convertido en el segundo factor de autenticación predeterminado. Pero tienen debilidades de seguridad documentadas que se explotan cada vez más a gran escala:

  • Phishing e ingeniería social: Los atacantes llaman o envían SMS a las víctimas haciéndose pasar por su banco, pidiéndoles que «lean el código» que acaban de recibir. Como los SMS no muestran identidad verificada, las víctimas no pueden distinguir un OTP bancario genuino de uno activado por un atacante.
  • SIM swapping: Los atacantes convencen a los operadores móviles para que transfieran el número de la víctima a una SIM que controlan, interceptando todos los SMS.
  • Vulnerabilidades SS7: El protocolo de señalización telefónica subyacente tiene fallos conocidos que permiten interceptar mensajes SMS.
  • Malware: El malware de Android puede leer mensajes SMS y reenviar códigos OTP a atacantes automáticamente.
Contexto de seguridad: El NIST ha desaconsejado el uso del SMS como factor de autenticación seguro en sistemas federales. La presión para migrar a alternativas más seguras está creciendo a nivel global.

Cómo RCS aborda estas vulnerabilidades

Identidad de remitente verificada — la mejora clave

La mejora de seguridad más importante que RCS aporta a la entrega de OTP es la identidad de remitente verificada. Cuando un servicio legítimo envía un OTP por RCS, el destinatario ve el nombre oficial de la marca, el logo en alta resolución y un sello de empresa verificada — todo antes de abrir el mensaje. Esta verificación está garantizada criptográficamente.

Soporte de auto-relleno de Android

Los OTPs por RCS admiten la función de auto-relleno de Android. Cuando el mensaje tiene el formato correcto, Android detecta automáticamente el código OTP y lo sugiere en el campo de entrada — el usuario toca una vez y el código queda introducido. Para habilitar el auto-relleno, el mensaje debe tener este formato:

# Formato de mensaje OTP compatible con auto-relleno Tu código de verificación de [MiMarca] es: 847291 Este código caduca en 10 minutos. No lo compartas con nadie. 847291 es tu código de [MiMarca]

Ejemplo de implementación

const enviarOTP = async (telefono, codigo) => { await fetch('https://api.sms.es/v1/rcs/messages', { method: 'POST', headers: { 'Authorization': `Bearer ${process.env.RCS_API_KEY}` }, body: JSON.stringify({ to: telefono, from: 'MiMarca', rcs: { text: `Tu código de MiMarca es: ${codigo}\n\nVálido 10 min. No compartas.\n\n${codigo} es tu código de MiMarca` }, fallback: { sms: { text: `[MiMarca] Tu código es ${codigo}. Válido 10 min.` } } }) }); };

RCS OTP vs otros métodos de autenticación

  • Más seguro que SMS OTP: Remitente verificado, enlace al dispositivo, auto-relleno — mejoras de seguridad significativas.
  • Más accesible que las apps de autenticación: No requiere descarga de app. Funciona en cualquier Android con Google Mensajes, y en iOS 18+.
  • UX comparable a WhatsApp OTP: Experiencia similar pero sin requerir WhatsApp y sin enrutar a través de la infraestructura de Meta.
  • Menos seguro que FIDO2/WebAuthn: La autenticación basada en hardware o biométrica sigue siendo el estándar para las operaciones de mayor riesgo.