Skip to main content
Once you have created a 2FA Service, use the methods below to implement the verification flow in your application.

Send a verification code

To send a code, create a Verification. Wavix automatically generates and sends the OTP.
Request body:
  • service_id: The unique ID of your 2FA Service.
  • to: The destination phone number in E.164 format.
  • channel: Use sms or voice.
Response example:
  • session_id: Use this ID to validate the OTP or resend the code.
  • number_lookup: Returned only if Number validation is enabled for the service.

Resend a verification code

If a user doesn’t receive the initial code or you want to try a different delivery method, use the resend method. While Wavix supports automatic channel failover, this method gives you manual control to resend a code via a specific channel (sms or voice).
Request body:

Validate an OTP

In order to validate an OTP entered by a user, use the method below:
Request body:
Response:

Additional operations

Cancel a Verification

You can cancel a Verification to invalidate all codes and prevent further resends.

Query service logs

Retrieve active Verifications and their associated events.
To see specific events for a session:
Event types:
  • Number lookup: Wavix checked if the destination number is valid.
  • Code sent via SMS: OTP sent via text.
  • Code sent via voice: OTP sent via automated call.
  • Verification: A code validation attempt.