{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-products/leandisposable/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"How to enroll a disposable with an OTP by WhatsApp","description":"Integration and usage documentation.","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"how-to-enroll-a-disposable-with-an-otp-by-whatsapp","__idx":0},"children":["How to enroll a disposable with an OTP by WhatsApp"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To enroll a lean disposable and send an OTP via WhatsApp you have to:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["specify the required ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["mobile"]}," property in the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects#disposablecontacts"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DisposableContacts"]}]}," object (E.164 format with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["+"]}," prefix)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["specify ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["otpType=WHATSAPP"]}]}," in the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/products/leandisposable/enterprise-documentation/developer-documentation/api-references/data-objects#disposablecertificate"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DisposableCertificate"]}]}," object"]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To use WHATSAPP as OTP the LRA has to be authorized. Verify with ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/products/leandisposable/enterprise-documentation/developer-documentation/api-references/lean-otherapi/lean-lracapabilities-method"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["getLraCapabilities"]}]}," that ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WHATSAPP"]}," is present in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["otp.allowed"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Then use these methods:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/products/leandisposable/enterprise-documentation/developer-documentation/api-references/lean-checkdata/lean-checkdata-method"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["checkData"]}]},"/",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/products/leandisposable/enterprise-documentation/developer-documentation/api-references/lean-checkdata/lean-checkdata-eid-assertion-method"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["checkDataWitheIDAssertion"]}]}," (optional) : check the validity of the objects passed to the enroll methods"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/products/leandisposable/enterprise-documentation/developer-documentation/api-references/lean-documents/lean-getdisposablecontract-method"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["getDisposableContract"]}]},"/",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/products/leandisposable/enterprise-documentation/developer-documentation/api-references/lean-documents/lean-getdisposablecontractwitheidassertion-method"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["getDisposableContractWitheIDAssertion"]}]}," (optional)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["an ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/products/leandisposable/enterprise-documentation/developer-documentation/api-references/lean-enroll"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["enroll"]}," method"]}," : enroll the certificate"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/products/leandisposable/enterprise-documentation/developer-documentation/api-references/lean-send-otp/lean-sendotp-method"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sendOtp"]}]}," : send the OTP via WhatsApp"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["signPKCS1WithSHA256"]}," in the FRA service or use SWS: sign the document"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/products/leandisposable/enterprise-documentation/developer-documentation/api-references/lean-documents/lean-uploaddoc-method"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["uploadDoc"]}]}," to upload the evidence of the OTP or the authentication flow (optional)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"whatsapp-template-configuration","__idx":1},"children":["WhatsApp template configuration"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["templateId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["language"]}," must reference a pre-configured WhatsApp template."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["whatsappOptions"]}," object in ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/products/leandisposable/enterprise-documentation/developer-documentation/api-references/lean-send-otp/lean-sendotp-method"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sendOtp"]}]}," requires:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["templateId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Identifier of a pre-configured WhatsApp template."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["language"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ISO 3166-1 alpha-2 language code (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IT"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EN"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RO"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DE"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ES"]},")."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameters"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["array"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List of template parameters. Must contain at least one element with key ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["text"]}," and value ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$OTP$"]}," as placeholder for the OTP code."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"request-example","__idx":2},"children":["Request example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"certIdOtp\": 123456,\n  \"deviceCode\": \"RHIDP123456\",\n  \"whatsappOptions\": {\n    \"templateId\": 1,\n    \"language\": \"IT\",\n    \"parameters\": [{\"text\": \"$OTP$\"}]\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"validation-rules","__idx":3},"children":["Validation rules"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameters"]}," must not be empty or null"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parameters"]}," must contain at least one element with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$OTP$"]}," placeholder"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["templateId"]}," does not match a configured template, the API returns error code 99 (\"OTP was not sent\")"]}]}]},"headings":[{"value":"How to enroll a disposable with an OTP by WhatsApp","id":"how-to-enroll-a-disposable-with-an-otp-by-whatsapp","depth":1},{"value":"WhatsApp template configuration","id":"whatsapp-template-configuration","depth":2},{"value":"Request example","id":"request-example","depth":4},{"value":"Validation rules","id":"validation-rules","depth":4}],"frontmatter":{"seo":{"title":"How to enroll a disposable with an OTP by WhatsApp"}},"lastModified":"2026-05-07T07:59:26.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/leandisposable/enterprise-documentation/developer-documentation/integration-guide/lean-ig-how-to-enroll-disposable-otp-whatsapp","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}