Challenge
Start a WhatsApp OTP challenge by sending the user a WhatsApp message containing an OTP code.
await authsignal.whatsapp.challenge()
authsignal.whatsapp.challenge()
await authsignal.whatsapp.challenge();
await authsignal.whatsapp.challenge();
Response
An unstructured error description present if the SDK call encountered an error.
Verify
Finish re-authenticating a WhatsApp OTP authenticator by verifying the code submitted by the user.
let response = await authsignal.whatsapp.verify(code: "123456")
let isVerified = response.isVerified
val response = authsignal.whatsapp.verify(code = "123456")
val isVerified = response.isVerified
const response = await authsignal.whatsapp.verify({ code: "123456" });
const isVerified = response.isVerified;
final response = await authsignal.whatsapp.verify("123456");
final isVerified = response.isVerified;
Parameters
The OTP code inputted by the user.
Response
response
AuthsignalResponse<VerifyResponse>
An unstructured error description present if the SDK call encountered an error.
True if the verification was successful.
A structured code present if the verification failed due to user error. Possible values are:
CODE_INVALID_OR_EXPIRED or MAX_ATTEMPTS_EXCEEDED.