Using the Headless SDK, requests can be easily customized to set a specific expiry, adjust the OTP length, and select a preferred delivery channel such as WhatsApp, SMS, or Viber for phone number authentication.
Headless request can be customized with custom expiry.
let request =OtplessRequest()request.set(phoneNumber:"9899XXXXXX", withCountryCode:"COUNTRY_CODE")// in secondsrequest.set(otpExpiry:"30")Task(priority:.userInitiated){awaitOtpless.shared.start(withRequest: request)}
Headless request can be customized with custom OTP length 4 or 6.
let request =OtplessRequest()request.set(phoneNumber:"9899XXXXXX", withCountryCode:"COUNTRY_CODE")// only 4 or 6 request.set(otpLength:"6")Task(priority:.userInitiated){awaitOtpless.shared.start(withRequest: request)}
Headless request can be customized with custom Delivery Channel like WHATSAPP, SMS and VIBER.
let request =OtplessRequest()request.set(phoneNumber:"9899XXXXXX", withCountryCode:"COUNTRY_CODE")// WHATSAPP,SMS and VIBERrequest.set(deliveryChannelForTransaction:"WHATSAPP")Task(priority:.userInitiated){awaitOtpless.shared.start(withRequest: request)}