OTP
OTP interface that encompasses authentication functions as well as other related functionality
Types
Link copied to clipboard
data class AuthParameters( val token: String, val methodId: String, val sessionDurationMinutes: UInt = DEFAULT_SESSION_TIME_MINUTES)
Content copied to clipboard
Data class used for wrapping parameters used with OTP authentication
Link copied to clipboard
Provides all possible ways to call WhatsApp OTP endpoints
Functions
Link copied to clipboard
abstract suspend fun authenticate(parameters: OTP.AuthParameters): AuthResponse
Content copied to clipboard
abstract fun authenticate(parameters: OTP.AuthParameters, callback: (AuthResponse) -> Unit)
Content copied to clipboard
Wraps the OTP authenticate API endpoint which validates the OTP token passed in. If this method succeeds, the user will be logged in, granted an active session