WhatsAppOTP

interface WhatsAppOTP

Provides all possible ways to call WhatsApp OTP endpoints

Types

Link copied to clipboard
data class Parameters(val phoneNumber: String, val expirationMinutes: UInt = DEFAULT_OTP_EXPIRATION_TIME_MINUTES)

Data class used for wrapping parameters used with WhatsApp OTP

Functions

Link copied to clipboard
abstract suspend fun loginOrCreate(parameters: OTP.WhatsAppOTP.Parameters): LoginOrCreateOTPResponse
abstract fun loginOrCreate(parameters: OTP.WhatsAppOTP.Parameters, callback: (LoginOrCreateOTPResponse) -> Unit)

Send a one-time passcode (OTP) to a user using their phone number via WhatsApp. If the phone number is not associated with a user already, a user will be created.

Link copied to clipboard
abstract suspend fun send(parameters: OTP.WhatsAppOTP.Parameters): BaseResponse
abstract fun send(parameters: OTP.WhatsAppOTP.Parameters, callback: (BaseResponse) -> Unit)

Send a one-time passcode (OTP) to a user's phone number via WhatsApp. If you'd like to create a user and send them a passcode with one request, use our loginOrCreate method.