Skip to content

About

Vonage REST API client for .NET, written in C#. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.

Topics

Resources

Code of conduct

Contributing

Stars

118 stars

Watchers

28 watching

Forks

Latest commit

 

History

1,759 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vonage Client Library for .NET

Build Status MultiFramework Build Status Quality Gate Status Coverage CodeScene Code Health Mutation testing badge Contributor Covenant

This library allows you to integrate features from Vonage's APIs into your application.

Full documentation and guides: vonage.github.io/vonage-dotnet-sdk

It requires a Vonage account first.

Installation

dotnet add package Vonage

Migration guides

Targeted frameworks

The SDK targets netstandard2.0 and is compatible with .NET 6, 7, and 8.

Quick Start

using Vonage;
using Vonage.Request;
using Vonage.VerifyV2.StartVerification;
using Vonage.VerifyV2.StartVerification.Sms;

var client = new VonageClient(
    Credentials.FromAppIdAndPrivateKeyPath("YOUR_APP_ID", "private.key"));

var result = await client.VerifyV2Client.StartVerificationAsync(
    StartVerificationRequest.Build()
        .WithBrand("MyApp")
        .WithWorkflow(SmsWorkflow.Parse("447700900000"))
        .Create());

result.Match(
    successOperation: response => Console.WriteLine($"Verification started: {response.RequestId}"),
    failureOperation: failure  => Console.WriteLine($"Error: {failure.GetFailureMessage()}"));

For authentication options, DI registration, configuration reference, and logging, see Getting Started.

Supported APIs

The following is a list of Vonage APIs and whether the Vonage .NET SDK provides support for them:

API API Release Status Supported?
Account API General Availability ✅
Alerts API General Availability ✅
Application API General Availability ✅
Conversations API General Availability ✅
Messages API General Availability ✅
Number Insight API General Availability ✅
Number Insight V2 API General Availability ✅
Number Management API General Availability ✅
Number Verification API General Availability ✅
Pricing API General Availability ✅
Redact API Developer Preview ✅
Reports API General Availability ✅
SimSwap API General Availability ✅
SMS API General Availability ✅
SubAccounts API General Availability ✅
Users API General Availability ✅
Verify API General Availability ✅
Verify V2 API General Availability ✅
Video API General Availability ✅
Voice API General Availability ✅

Contributing

Pick your preferred IDE:

  • Visual Studio (Community is fine)
  • Visual Studio Code
  • Jetbrains Rider
  1. Get the latest code either by cloning the repository or downloading a snapshot of the source.
  2. Open Vonage.sln
  3. Build — NuGet dependencies should be brought down automatically.
  4. Run all tests to verify everything's fine.

Pull requests are welcome!

Release

To publish a new version, use the release script:

./release.sh <version> [--dry-run]

For example:

# Preview the release without making changes
./release.sh 8.30.0 --dry-run

# Perform the release
./release.sh 8.30.0

The script will:

  1. Update the version in Vonage/Vonage.csproj
  2. Commit and create a git tag
  3. Generate the changelog using git-cliff
  4. Push to remote
  5. Create a GitHub release

Pre-release versions are also supported (e.g., 8.30.0-beta).

License

This library is released under the MIT License.

About

Vonage REST API client for .NET, written in C#. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.

Topics

Resources

Code of conduct

Contributing

Stars

118 stars

Watchers

28 watching

Forks

Releases

Packages

Used by

Contributors

Languages

⌂ 换网址