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

Challenge

Start enrollment re-authentication for an existing WhatsApp authenticator by sending the user a WhatsApp message containing an OTP code.
const response = await authsignal.whatsapp.challenge();

Response

response
AuthsignalResponse<ChallengeResponse>

Verify

Finish enrolling or re-authenticating a WhatsApp OTP authenticator by verifying the code submitted by the user.
const response = await authsignal.whatsapp.verify({ code: "123456" });

Parameters

code
string
The OTP code inputted by the user.

Response

response
AuthsignalResponse<VerifyResponse>
data
VerifyResponse