Get Auto Read OTP
For SMS, you can auto-read the OTP if the user’s SIM is on the same device. You will get the OTP in the HeadlessResponse itself withOTP_AUTO_READ responseType.
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
OTP_AUTO_READ responseType.
const callback = (eventCallback) => {
console.log({
eventCallback
});
const OTP_AUTO_READ = () => {
const {
response: {
otp
}
} = eventCallback;
// Auto-read OTP value
//console.log(otp);
}
const EVENTS_MAP = {
OTP_AUTO_READ
}
if ("responseType" in eventCallback) EVENTS_MAP[eventCallback.responseType]()
}