Before sending and validating a one-time password (OTP), you must create a 2FA Service using the Wavix portal. The service must be created only once, you can use it to generate and validate as many OTPs as needed.
In order to send and verify an OTP, you must:
Use this method to create a new Wavix 2FA Verification. Once the Verification is created, Wavix will automatically generate a new random verification code and send it to the end user’s phone number via the communication channel specified in the request.
An API key to authorize your request
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"
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"