Skip to main content
All WhatsApp OTP SDK methods require you to initiate an action first. Check out our guide on WhatsApp authentication for more details.

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

response
AuthsignalResponse<void>

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

code
string
The OTP code inputted by the user.

Response

response
AuthsignalResponse<VerifyResponse>
data
VerifyResponse