Vonage .NET SDK

Official .NET client library for Vonage APIs; SMS, Voice, Video, Verify, Messages, and more.

This site documents the latest release. If you are pinned to an older version, the compiled XML docs in your installed package (IntelliSense) match your version.

Install

dotnet add package Vonage
Install-Package Vonage

Quick start

A minimal verification call. For authentication options, dependency injection, configuration, and logging, see Getting Started.

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($"Request ID: {response.RequestId}"),
    failureOperation: failure  => Console.WriteLine($"Error: {failure.GetFailureMessage()}"));

Where to go next