Create a 2FA Verification
Creates a new 2FA Verification and sends a one-time password (OTP) to the destination phone number. Before using this endpoint, create a 2FA Service in the Wavix portal. The service is created once and reused to generate and validate OTPs. OTP flow:
- Create a Verification to generate and send an OTP.
- Reuse the same Verification to resend the OTP if needed.
- Validate the OTP using the 2FA API
When a Verification is created, Wavix generates a random code and sends it to the destination phone number via the selected channel.
Authorizations
Wavix API key. Pass as Authorization: Bearer <api_key>. Keys support per-resource scopes (none / read / write). See Restricted keys and scopes.
Body
Verification configuration.
Unique Wavix 2FA Service ID. Find your 2FA Service ID on the Wavix portal.
"7204a030201211ee9fb47d093f2f127c"
End user's phone number to which the verification code will be sent. The phone number must be in E.164 format.
"447919433768"
The communication channel you want to use. Can be either sms or voice.
"sms"
Response
Verification created.
Indicates whether the 2FA Verification was successfully created
true
Unique identifier of the Wavix 2FA Service
"7204a030201211ee9fb47d093f2f127c"
Automatically generated 2FA Verification URL. The URL can be used to resend or validate the OTP.
"https://api.wavix.com/v1/two-fa/verification/2953d4308f2e11ecb75fcdafd6d2d687"
Unique identifier of the Wavix 2FA Verification
"2953d4308f2e11ecb75fcdafd6d2d687"
The end user’s phone number
"447919433768"
Date and time the 2FA Verification is created
"2022-02-16T13:41:38.000Z"