Table of Contents

Struct StartVerificationRequest

Namespace
Vonage.VerifyV2.StartVerification
Assembly
Vonage.dll

Represents a request to initiate a verification by sending a PIN code to a user through one or more channels (SMS, Voice, Email, WhatsApp, or Silent Auth).

public readonly struct StartVerificationRequest : IVonageRequest
Implements
Inherited Members

Properties

Brand

The brand name that appears in the verification message. Limited to 16 characters. Cannot contain special characters: \ / { } : $.

public string Brand { get; }

Property Value

string

ChannelTimeout

The wait time in seconds between attempts to deliver the verification code (between 15 and 900). Default is 300 seconds. On the Verify Success pricing model, minimum is fixed at 60 seconds.

public int ChannelTimeout { get; }

Property Value

int

ClientReference

An optional reference string (1-40 alphanumeric characters) that will be included in webhook callbacks for tracking purposes.

public Maybe<string> ClientReference { get; }

Property Value

Maybe<string>

Code

An optional custom alphanumeric PIN code (4-10 characters) to use instead of an auto-generated code. Only available on the Verify Conversion pricing model and has no effect on Silent Auth.

public Maybe<string> Code { get; }

Property Value

Maybe<string>

CodeLength

The length of the PIN code to generate (4-10 digits). Default is 4. Applies to all channels in the workflow.

public int CodeLength { get; }

Property Value

int

FraudCheck

When true (default), the request will perform fraud checking. Set to false to bypass network blocks for testing or special cases.

public bool FraudCheck { get; }

Property Value

bool

Locale

The language locale for verification messages. Default is "en-us". Has no effect on Silent Auth channels.

public Locale Locale { get; }

Property Value

Locale

TemplateId

An optional custom template ID to use for SMS or Voice channel messages instead of the default template.

public Maybe<Guid> TemplateId { get; }

Property Value

Maybe<Guid>

Workflows

The sequence of verification workflows (1-3) that define how to reach the user. The first workflow is tried first; subsequent workflows are used as fallbacks.

public IVerificationWorkflow[] Workflows { get; }

Property Value

IVerificationWorkflow[]

Methods

Build()

Creates a new builder to construct a StartVerificationRequest.

public static IBuilderForBrand Build()

Returns

IBuilderForBrand

A builder interface to set the brand name.

Examples

var request = StartVerificationRequest.Build()
    .WithBrand("MyApp")
    .WithWorkflow(SmsWorkflow.Parse("447700900000"))
    .WithFallbackWorkflow(VoiceWorkflow.Parse("447700900000"))
    .WithLocale("en-us")
    .WithCodeLength(6)
    .Create();
See Also

BuildRequestMessage()

Converts the request to a HttpRequest.

public HttpRequestMessage BuildRequestMessage()

Returns

HttpRequestMessage

The Http request.