Skip to main content

User

The User APIs help manage everything related to logging in and securing your account. They allow you to sign in, verify your password or MPIN, reset your password if you forget it, and update your login details whenever needed.

📄️ User Profile v2

Use this API to retrieve User details such as Name, unmasked email, unmasked telephone no. The data will be in encrypted format. The methodology to decrypt the data is as shown below, for the key please get in touch with the support team. <div style='background-color: black; color: white;'> <p>Decryption Logic</p> <code style='background-color: black; color: white;'> decryptWithAEScbc(sKey, str) { </br> &nbsp;&nbsp;const combined = CryptoJS.enc.Base64.parse(str); <span style='color: green;'>// Parse the Base64-encoded input.</span> </br> &nbsp;&nbsp;<span style='color: green;'>// Extract the IV from the first 16 bytes</span> </br> &nbsp;&nbsp;const extractedIv = CryptoJS.lib.WordArray.create(combined.words.slice(0, 4)); </br> &nbsp;&nbsp;extractedIv.sigBytes = 16; </br> &nbsp;&nbsp;<span style='color: green;'>// Extract the ciphertext from the remaining bytes</span> </br> &nbsp;&nbsp;const ciphertext = CryptoJS.lib.WordArray.create(combined.words.slice(4)); </br> &nbsp;&nbsp;ciphertext.sigBytes = combined.sigBytes - 16; </br> &nbsp;&nbsp;const key = CryptoJS.enc.Utf8.parse(sKey); <span style='color: green;'>// Parse the key to a WordArray object</span> </br> &nbsp;&nbsp;const decrypted = CryptoJS.AES.decrypt({ ciphertext }, key, { <span style='color: green;'>// Decrypt the &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ciphertext using the extracted IV </span> </br> &nbsp;&nbsp;iv: extractedIv, </br> &nbsp;&nbsp;mode: CryptoJS.mode.CBC, </br> &nbsp;&nbsp; padding: CryptoJS.pad.Pkcs7 </br> &nbsp;&nbsp;}); </br> &nbsp;&nbsp;return decrypted.toString(CryptoJS.enc.Utf8); <span style='color: green;'>// Return the decrypted result as a &nbsp; &nbsp; &nbsp;UTF-8 string.</span> </br> } </br> </code> </div>