2FA
Create a 2FA Verification
Creates a 2FA verification and sends a one-time password (OTP) to the destination phone number over the selected channel. Requires a 2FA service configured in the Wavix portal; the service is reused to generate and validate OTPs.
The verification proceeds through three steps:
- Create a verification to generate and send an OTP.
- Resend the OTP on the same verification if needed.
- Validate the OTP through the check endpoint.
post/v1/two-fa/verification
Request body
Example request
{
"service_id": "7204a030201211ee9fb47d093f2f127c",
"to": "447919433768",
"channel": "sms"
}Response
Returns the created 2FA verification.
Example response
{
"success": true,
"service_id": "7204a030201211ee9fb47d093f2f127c",
"session_url": "https://api.wavix.com/v1/two-fa/verification/2953d4308f2e11ecb75fcdafd6d2d687",
"session_id": "2953d4308f2e11ecb75fcdafd6d2d687",
"destination": "447919433768",
"created_at": "2022-02-16T13:41:38.000Z",
"number_lookup": {
"number_type": "mobile",
"country": "GB",
"current_carrier": "Vodafone"
}
}