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.

Custom Expiry

Headless request can be customized with custom expiry.

// in seconds
OTPlessSignin.initiate({
            channel: 'PHONE',
            phone: "9999999999",
            countryCode: "+91",
            expiry: "60"
        })

Custom OTP length

Headless request can be customized with custom OTP length 4 or 6.

// only 4 or 6 
OTPlessSignin.initiate({
            channel: 'PHONE',
            phone: "9999999999",
            countryCode: "+91",
            otpLength: 6
        })

Custom Delivery Channel

Headless request can be customized with custom Delivery Channel like WHATSAPP, SMS and VIBER.

// WHATSAPP,SMS and VIBER
 OTPlessSignin.initiate({
            channel: 'PHONE',
            phone: "9999999999",
            countryCode: "+91",
            deliveryChannel: "WHATSAPP"
        })