Struct SilentAuthWorkflow
- Namespace
- Vonage.VerifyV2.StartVerification.SilentAuth
- Assembly
- Vonage.dll
Represents a verification workflow that uses Silent Authentication to verify a user's phone number without requiring them to enter a PIN code. The device must be connected via cellular data for this to work.
public readonly struct SilentAuthWorkflow : IVerificationWorkflow
- Implements
- Inherited Members
Properties
Channel
The verification channel identifier (e.g., "sms", "voice", "email", "whatsapp", "whatsapp_interactive", "silent_auth").
[JsonPropertyOrder(0)]
public string Channel { get; }
Property Value
RedirectUrl
An optional final redirect URL appended to the end of the check_url request/response lifecycle. The request_id and code will be included as URL fragment parameters (e.g., https://example.com/callback#request_id=xxx&code=yyy).
[JsonPropertyOrder(2)]
[JsonConverter(typeof(MaybeJsonConverter<Uri>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Maybe<Uri> RedirectUrl { get; }
Property Value
To
The phone number to authenticate in E.164 format without leading + or 00 (e.g., "447700900000"). This must match the SIM card in the device making the cellular request.
[JsonPropertyOrder(1)]
[JsonConverter(typeof(PhoneNumberJsonConverter))]
public PhoneNumber To { get; }
Property Value
Methods
Parse(string)
Creates a new Silent Authentication workflow without a redirect URL.
public static Result<SilentAuthWorkflow> Parse(string to)
Parameters
tostringThe phone number to authenticate in E.164 format without leading + or 00 (e.g., "447700900000").
Returns
- Result<SilentAuthWorkflow>
A Result<T> containing the workflow if successful, or validation errors if the phone number is invalid.
Examples
var workflow = SilentAuthWorkflow.Parse("447700900000");
- See Also
Parse(string, Uri)
Creates a new Silent Authentication workflow with a custom redirect URL for client SDK integrations.
public static Result<SilentAuthWorkflow> Parse(string to, Uri redirectUrl)
Parameters
tostringThe phone number to authenticate in E.164 format without leading + or 00 (e.g., "447700900000").
redirectUrlUriThe URL to redirect to after Silent Auth completion. The request_id and code are appended as URL fragments.
Returns
- Result<SilentAuthWorkflow>
A Result<T> containing the workflow if successful, or validation errors if the phone number is invalid.
Examples
var workflow = SilentAuthWorkflow.Parse("447700900000", new Uri("https://example.com/callback"));
- See Also
Serialize(IJsonSerializer)
Serializes the workflow configuration to JSON format for the API request.
public string Serialize(IJsonSerializer serializer)
Parameters
serializerIJsonSerializerThe JSON serializer to use.
Returns
- string
The JSON representation of the workflow.