VerifyApi 1.1.0
Prefix Reserveddotnet add package VerifyApi --version 1.1.0
NuGet\Install-Package VerifyApi -Version 1.1.0
<PackageReference Include="VerifyApi" Version="1.1.0" />
paket add VerifyApi --version 1.1.0
#r "nuget: VerifyApi, 1.1.0"
// Install VerifyApi as a Cake Addin #addin nuget:?package=VerifyApi&version=1.1.0 // Install VerifyApi as a Cake Tool #tool nuget:?package=VerifyApi&version=1.1.0
VerifyAPI .NET
A two-factor authentication API library for voice & SMS through the VerifyAPI service, supporting .NET Standard 2.0+, .NET Core 3.1, .NET 6.0+ and .NET Framework 4.6.1+ synchronously/asynchronously.
Installation
Using the .NET Core command-line interface (CLI) tools:
dotnet add package VerifyApi
Using the NuGet Command Line Interface (CLI):
nuget install VerifyApi
Using the Package Manager Console:
Install-Package VerifyApi
From within Visual Studio:
- Open the Solution Explorer.
- Right-click on a project within your solution.
- Click on Manage NuGet Packages...
- Click on the Browse tab and search for "VerifyAPI".
- Click on the VerifyAPI package, select the appropriate version in the right-tab and click Install.
Documentation
The concepts behind VerifyAPI are available at our guide. For comprehensive authentication and endpoint reference, check out the API documentation.
Usage
Authentication
VerifyAPI authenticates API requests using an API key issued by your account, which you can find in the API keys section of the VerifyAPI portal. A default API key will have been issued when your account was first created.
The API key should be supplied as part of the constructor when creating a new client instance:
VerifyApiClient client = new VerifyApiClient("YOUR_API_KEY");
Create a verification
The VerifyAsync
method of the client can be used to initiate a new verification
var verification = await client.VerifyAsync("+12123464738", Channel.Sms);
// Check that the verification was successful
Console.WriteLine(verification.IsSuccess)
Confirm a verification
The ConfirmAsync
method of the client is used is used in conjunction with the id
returned by VerifyAsync
as well as the code that is supplied by the end-user.
var confirmation = await client.ConfirmAsync("6603443f241aa2b2299003b6", "123456");
// Check that the confirmation code and id matched
Console.WriteLine(verification.IsSuccess)
Using a custom HttpClient
You can configure the library with your own custom HttpClient
:
VerifyApiClient client = new VerifyApiClient("YOUR_API_KEY", httpClient: new HttpClient());
This allows you to inject your own HTTP client with custom settings, such as a proxy server, custom message handler, etc.
Support
New features and bug fixes are released on the latest major version of the VerifyAPI .NET client library. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.1
- Newtonsoft.Json (>= 13.0.3)
- System.Configuration.ConfigurationManager (>= 4.7.0)
-
.NETFramework 4.6.1
- Microsoft.Bcl.AsyncInterfaces (>= 1.1.0)
- Newtonsoft.Json (>= 13.0.3)
- System.Runtime.InteropServices.RuntimeInformation (>= 4.3.0)
-
.NETStandard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 1.1.0)
- Newtonsoft.Json (>= 13.0.3)
- System.Configuration.ConfigurationManager (>= 4.5.0)
-
net6.0
- Newtonsoft.Json (>= 13.0.3)
- System.Configuration.ConfigurationManager (>= 6.0.0)
-
net8.0
- Newtonsoft.Json (>= 13.0.3)
- System.Configuration.ConfigurationManager (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.