To enroll a lean disposable and send an OTP via WhatsApp you have to:
- specify the required mobile property in the
DisposableContactsobject (E.164 format with+prefix) - specify
otpType=WHATSAPPin theDisposableCertificateobject
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:
checkData/checkDataWitheIDAssertion(optional) : check the validity of the objects passed to the enroll methodsgetDisposableContract/getDisposableContractWitheIDAssertion(optional)- an enroll method : enroll the certificate
sendOtp: send the OTP via WhatsAppsignPKCS1WithSHA256in the FRA service or use SWS: sign the documentuploadDocto upload the evidence of the OTP or the authentication flow (optional)
The templateId and language must reference a pre-configured WhatsApp template.
The whatsappOptions object in sendOtp requires:
| Parameter | Type | Required | Description |
|---|---|---|---|
templateId | integer | Yes | Identifier of a pre-configured WhatsApp template. |
language | string | Yes | ISO 3166-1 alpha-2 language code (IT, EN, RO, DE, ES). |
parameters | array | Yes | List of template parameters. Must contain at least one element with key text and value $OTP$ as placeholder for the OTP code. |
{
"certIdOtp": 123456,
"deviceCode": "RHIDP123456",
"whatsappOptions": {
"templateId": 1,
"language": "IT",
"parameters": [{"text": "$OTP$"}]
}
}parametersmust not be empty or nullparametersmust contain at least one element with$OTP$placeholder- If
templateIddoes not match a configured template, the API returns error code 99 ("OTP was not sent")