Class VerifyClient
public class VerifyClient : IVerifyClient
- Inheritance
-
VerifyClient
- Implements
- Inherited Members
Constructors
VerifyClient(Credentials)
public VerifyClient(Credentials creds = null)
Parameters
credsCredentials
Properties
Credentials
public Credentials Credentials { get; set; }
Property Value
Methods
ValidateVerifyResponse(VerifyResponseBase)
public void ValidateVerifyResponse(VerifyResponseBase response)
Parameters
responseVerifyResponseBase
VerifyCheckAsync(VerifyCheckRequest, Credentials)
Validates the PIN code entered by the user against the verification request.
public Task<VerifyCheckResponse> VerifyCheckAsync(VerifyCheckRequest request, Credentials creds = null)
Parameters
requestVerifyCheckRequestThe check request containing the request ID and the user-entered PIN code.
credsCredentialsOptional credentials to override the default client credentials.
Returns
- Task<VerifyCheckResponse>
A VerifyCheckResponse indicating whether the code was valid and the cost incurred. Throws VonageVerifyResponseException if the check fails.
Examples
var request = new VerifyCheckRequest { RequestId = "abcd1234", Code = "1234" };
var response = await client.VerifyCheckAsync(request);
- See Also
VerifyControlAsync(VerifyControlRequest, Credentials)
Controls an in-progress verification request by cancelling it or triggering the next event.
public Task<VerifyControlResponse> VerifyControlAsync(VerifyControlRequest request, Credentials creds = null)
Parameters
requestVerifyControlRequestThe control request containing the request ID and command ("cancel" or "trigger_next_event").
credsCredentialsOptional credentials to override the default client credentials.
Returns
- Task<VerifyControlResponse>
A VerifyControlResponse confirming the command was executed. Throws VonageVerifyResponseException if the control command fails.
Examples
var request = new VerifyControlRequest { RequestId = "abcd1234", Cmd = "cancel" };
var response = await client.VerifyControlAsync(request);
- See Also
VerifyRequestAsync(VerifyRequest, Credentials)
Generates and sends a verification PIN code to the user's phone number via SMS or voice call.
public Task<VerifyResponse> VerifyRequestAsync(VerifyRequest request, Credentials creds = null)
Parameters
requestVerifyRequestThe verification request containing the phone number, brand name, and optional workflow settings.
credsCredentialsOptional credentials to override the default client credentials.
Returns
- Task<VerifyResponse>
A VerifyResponse containing the request ID to use in subsequent check calls. Throws VonageVerifyResponseException if the request fails.
Examples
var request = new VerifyRequest { Number = "447700900000", Brand = "MyApp" };
var response = await client.VerifyRequestAsync(request);
var requestId = response.RequestId;
- See Also
VerifyRequestWithPSD2Async(Psd2Request, Credentials)
Generates and sends a verification PIN code for PSD2 payment authorization, displaying the payee and amount to the user.
public Task<VerifyResponse> VerifyRequestWithPSD2Async(Psd2Request request, Credentials creds = null)
Parameters
requestPsd2RequestThe PSD2 request containing the phone number, payee name, and payment amount in Euros.
credsCredentialsOptional credentials to override the default client credentials.
Returns
- Task<VerifyResponse>
A VerifyResponse containing the request ID to use in subsequent check calls. Throws VonageVerifyResponseException if the request fails.
Examples
var request = new Psd2Request { Number = "447700900000", Payee = "Acme Corp", Amount = 99.99 };
var response = await client.VerifyRequestWithPSD2Async(request);
- See Also
VerifySearchAsync(VerifySearchRequest, Credentials)
Retrieves the current status and details of a verification request.
public Task<VerifySearchResponse> VerifySearchAsync(VerifySearchRequest request, Credentials creds = null)
Parameters
requestVerifySearchRequestThe search request containing the request ID to look up.
credsCredentialsOptional credentials to override the default client credentials.
Returns
- Task<VerifySearchResponse>
A VerifySearchResponse containing the verification status, events, and check attempts.
Examples
var request = new VerifySearchRequest { RequestId = "abcd1234" };
var response = await client.VerifySearchAsync(request);
- See Also