OTP
The OTP interface provides methods for sending and authenticating One-Time Passcodes (OTP) via SMS, WhatsApp, and Email.
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
Authenticate a user given a method_id (the associated email_id or phone_id) and a code. This endpoint verifies that the code is valid, hasn't expired or been previously used. A given method_id may only have a single active OTP code at any given time, if a user requests another OTP code before the first one has expired, the first one will be invalidated.