Skip to content

OTP Configuration

Page OTP Configuration (/developer/otp-config) provides centralized control for configuring omnichannel One-Time Password (OTP) services in Mahadata. Developers can configure security policies, code expiration durations,rate limiting, delivery via WhatsApp with official authentication templates, as well as automatic failover to SMS.

OTP Configuration page: security policies, WhatsApp channel, and SMS failover
OTP Configuration page: security policies, WhatsApp channel, and SMS failover
  • Portal URL: /developer/otp-config
  • Permissions: Requires OTP feature access permission (useOtpAccess). This menu is only displayed in the Developer navigation for workspaces with an active authentication module.

Security Policies & Limits (Policy & Security Limits)

Section titled “Security Policies & Limits (Policy & Security Limits)”
ParametersDefaultDescription
Code Length (Digits)6Number of digits in the OTP code: 4 or 6 numeric digits.
TTL Validity (Seconds)60Validity period of the OTP code before it expires (e.g., 60–300 seconds).
Max Verification Attempts3Limit on incorrect code entry attempts by the user before the code is permanently invalidated.
Lockout Duration (Seconds)60Temporary lockout period if the user exceeds the attempt limit.
Max Requests per Window5Limit on requests for a new code within a specific time window.
Request Window (Seconds)60Duration of the time window for calculating the request limit.
Max Resends3Maximum number of resends (resend) allowed for a single verification session.
Resend Min Interval (Seconds)30Minimum time interval before the user can request a resend of the code.

WhatsApp Sender Configuration (Primary Channel)

Section titled “WhatsApp Sender Configuration (Primary Channel)”

WhatsApp is the primary channel for sending OTP because of its more efficient rates and high readability:

  • WABA Sender Phone: The sender’s official WhatsApp phone number for OTP.
  • WhatsApp Template Name: Category template name AUTHENTICATION that has been approved by Meta.
  • Template Language: The template language code (e.g., id for Bahasa Indonesia or en_US).

Automatic Failover to SMS (Secondary Channel)

Section titled “Automatic Failover to SMS (Secondary Channel)”

If the WhatsApp message fails to be delivered (for example, the destination phone number has no internet connection or is not registered on WhatsApp):

  • Enable SMS Failover: The switch to enable automatic failover.
  • SMS Sender Reference: Selects the registered official SMS Sender ID.
  • Message Templates: The SMS message text with the required placeholder token {{code}} (e.g.: Kode OTP Anda adalah {{code}}. Berlaku 60 detik. RAHASIAKAN kode ini.).

Mahadata supports automatic filling of OTP codes in users’ Android apps (SMS Retriever API / WhatsApp One-Tap):

  • Package Name: Your Android app’s package name (e.g., com.perusahaan.app).
  • Signature Hash: An 11-character hash of your Android app’s signing certificate (Base64).
  • Autofill Text: Custom text inserted into the message body so the Android system automatically recognizes the OTP code.
  1. Open the Developer → OTP Config (/developer/otp-config).
  2. Set the code digit policy (4 or 6 digits) and the TTL expiration period.
  3. Connect your WABA number and WhatsApp authentication template.
  4. menu Enable SMS Failover and select a backup Sender ID.
  5. (Optional) Enter your Android app’s Package Name and Hash to enable autofill features.
  6. Click Save Configuration to apply the configuration to the API engine.