Class VerificationRequest

java.lang.Object
com.vonage.client.verify2.VerificationRequest
All Implemented Interfaces:
Jsonable

public class VerificationRequest extends Object implements Jsonable
Defines properties for a verify request to be sent to the user. Such properties include the brand (i.e. the sender that the user sees asking them for verification), language to send the message in, length of the verification code and timeout between delivery channel workflows.

A verification request can have multiple "workflows". Each workflow defines a contact method for verification. The order of workflows defines the order in which each contact method will be attempted. Once a contact method has succeeded, the remaining workflows will be aborted. This flexibility exists as a fallback / backup verification. A different communication channel and/or number can be contacted if desired.

  • Field Details

  • Method Details

    • getBrand

      public String getBrand()
      The brand that is sending the verification request. This is what the user will see when they receive the notification.
      Returns:
      The verification sender name.
    • getLocale

      public Locale getLocale()
      Language for the request in ISO_639-1 format.
      Returns:
      The locale, or null if not set (the default).
    • getLocaleAsString

    • getChannelTimeout

      Specifies the wait time in seconds between attempts to delivery the verification code.
      Returns:
      The delivery timeout, or null if not set (the default).
    • getCodeLength

      Length of the code to send to the user. Does not apply to codeless verification channels.
      Returns:
      The verification code length, or null if unset (the default) or not applicable.
    • getCode

      public String getCode()
      Custom alphanumeric verification code to send to the user instead of the Vonage-generated one.
      Returns:
      The custom code, or null if unset.
    • getClientRef

      public String getClientRef()
      If the client_ref is set when the request is sent, it will be included in the callbacks.
      Returns:
      The client reference, or null if not set.
    • getFraudCheck

      Determines if the network level fraud check is enforced. See the documentation. This feature only takes effect if it has been enabled on your account.
      Returns:
      Whether network block is respected, or null if not set or true (the default).
    • getWorkflows

      protected List<Workflow> getWorkflows()
      Workflows are a sequence of actions that Vonage use to reach the user you wish to verify with a PIN code.
      Returns:
      The list of workflows (contact methods) to be used in verification, in order of preference.
    • isCodeless

      public boolean isCodeless()
      Determines if the workflows defined in this request do not prompt the user for code entry.
      Returns:
      true if all the defined workflows do not require a code or false if at least one of the contact methods involves a code being sent to the user.
    • builder

      Entry point for constructing an instance of this class.
      Returns:
      A new Builder.