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)

Functions

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

Wraps Stytch’s WhatsApp OTP login_or_create endpoint. Requests a WhatsApp OTP for a user to log in or create an account depending on the presence and/or status current account.

Link copied to clipboard
abstract suspend fun send(parameters: OTP.WhatsAppOTP.Parameters): BaseResponse

Wraps Stytch’s WhatsApp OTP send endpoint. Requests an WhatsApp OTP for a user to authenticate.

abstract fun send(parameters: OTP.WhatsAppOTP.Parameters, callback: (BaseResponse) -> Unit)

Wraps Stytch’s WhatsApp OTP send endpoint. Requests a WhatsApp OTP for a user to authenticate.