Skip to content

How to enroll a disposable with an OTP by WhatsApp

To enroll a lean disposable and send an OTP via WhatsApp you have to:

To use WHATSAPP as OTP the LRA has to be authorized. Verify with getLraCapabilities that WHATSAPP is present in otp.allowed.

Then use these methods:

WhatsApp template configuration

The templateId and language must reference a pre-configured WhatsApp template.

The whatsappOptions object in sendOtp requires:

ParameterTypeRequiredDescription
templateIdintegerYesIdentifier of a pre-configured WhatsApp template.
languagestringYesISO 3166-1 alpha-2 language code (IT, EN, RO, DE, ES).
parametersarrayYesList of template parameters. Must contain at least one element with key text and value $OTP$ as placeholder for the OTP code.

Request example

{
  "certIdOtp": 123456,
  "deviceCode": "RHIDP123456",
  "whatsappOptions": {
    "templateId": 1,
    "language": "IT",
    "parameters": [{"text": "$OTP$"}]
  }
}

Validation rules

  • parameters must not be empty or null
  • parameters must contain at least one element with $OTP$ placeholder
  • If templateId does not match a configured template, the API returns error code 99 ("OTP was not sent")