Package com.vonage.client.verify
Class VerifyRequest.Builder
java.lang.Object
com.vonage.client.verify.VerifyRequest.Builder
- Enclosing class:
VerifyRequest
Builder to create a Two Factor Authentication request
- Since:
- 5.5.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the VerifyRequest.The country for the destination phone number.nextEventWait(Integer nextEventWait) A custom PIN to send to the user.workflow(VerifyRequest.Workflow workflow) Set the predefined sequence of SMS and TTS (Text To Speech) actions to use in order to convey the PIN to your user.
-
Constructor Details
-
Builder
- Parameters:
number- (required) The recipient's phone number in E.164 format.brand- (required) The name of the company or app to be verified for. Must not be longer than 18 characters.
-
-
Method Details
-
senderId
- Parameters:
senderId- the short alphanumeric string to specify the SenderID for SMS sent by Verify.- Returns:
- This builder.
-
workflow
Set the predefined sequence of SMS and TTS (Text To Speech) actions to use in order to convey the PIN to your user. See https://developer.vonage.com/verify/guides/workflows-and-events- Parameters:
workflow- The workflow to use for conveying the PIN to your user.- Returns:
- This builder.
-
locale
- Parameters:
locale- (optional) Override the default locale used for verification. By default the locale is determined from the country code included innumber- Returns:
- This builder.
-
length
- Parameters:
length- (optional) The length of the verification code to be sent to the user. Must be either 4 or 6. Use -1 to use the default value.- Returns:
- This builder.
-
pinExpiry
- Parameters:
pinExpiry- (optional) the PIN validity time from generation, in seconds. Default is 300 seconds- Returns:
- This builder.
-
nextEventWait
- Parameters:
nextEventWait- (optional) the wait time between attempts to deliver the PIN. A number between 600-900.- Returns:
- This builder.
-
country
The country for the destination phone number.If you wish to used localised number formats or you are not sure if number is correctly formatted, set this to a two-character country code. For example, GB, US. Verify will work out the international phone number for you.
- Parameters:
country- a String containing a 2-character country code- Returns:
- This builder.
-
pinCode
A custom PIN to send to the user. If a PIN is not provided, Verify will generate a random PIN for you. This feature is not enabled by default - please discuss with your Account Manager if you would like it enabled.- Parameters:
pinCode- The custom code as a string.- Returns:
- This builder.
- Since:
- 7.5.0
-
build
Builds the VerifyRequest.- Returns:
- A new VerifyRequest with this builder's properties.
-