SharpNyx 0.2.3

.NET Core 2.1
There is a newer version of this package available.
See the version list below for details.
dotnet add package SharpNyx --version 0.2.3
NuGet\Install-Package SharpNyx -Version 0.2.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SharpNyx" Version="0.2.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SharpNyx --version 0.2.3
#r "nuget: SharpNyx, 0.2.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SharpNyx as a Cake Addin
#addin nuget:?package=SharpNyx&version=0.2.3

// Install SharpNyx as a Cake Tool
#tool nuget:?package=SharpNyx&version=0.2.3


Telnyx API C# wrapper for .Net Core. Uses HttpClient.


  • .NETCoreApp 2.1
  • Newtonsoft.Json (>= 12.0.2)

It should work with .Net standard but you may have to manually import the Telnyx.dll.


Add the NuGet package or download and reference the Telnyx.dll issued in Releases.


Send a message
using Telnyx.SharpNyx;

//Quick instantiation
MessagingAPIClient mac = new MessagingAPIClient("Q7EI8KGZJ3FrwBxMKq5zmID1");

//Make a new SMS message
SMS sms = new SMS("BUGSINC", "+16506003337", "Hello Telnyx");

//Call and wait for SendSMS to finish

//Check to see if it is queued
bool isq = sms.IsQueued;
//Send a message with just the recipient and body
Message msg = new Message();
msg.ToPhoneNumber = "+16506003337";
msg.Body = "Hello Telnyx";
Send Quick MMS
//Quickly send one image without subject
MessagingAPIClient mac = new MessagingAPIClient("M7RI1KGBJ8FrwBxTKq3zmIN1");

string url = "";

MMS mms = new MMS("+BUGSINC", "+16508976777", new Dictionary<string, string> { { MediaUtype.Image, url } });


return mms.IsQueued;
MMS With Two Images
//Send two images with a subject
MessagingAPIClient mac = new MessagingAPIClient("M7RI1KGBJ8FrwBxTKq3zmIN1");

string url1 = "";
string url2 = "";

Dictionary<string, string> dic1 = new Dictionary<string, string>();
dic.Add(MediaUtype.Image, url1);

Dictionary<string, string> dic2 = new Dictionary<string, string>();
dic2.Add(MediaUtype.Image, url2);

MMS mms = new MMS()
    FromPhoneNumber = "+BUGSINC",
    Subject = "Alcyone",
    ToPhoneNumber = "+16508976777",
    MediaUrls = new List<Dictionary<string, string>>() { dic1, dic2 }


return mms.IsQueued;
The Messaging API Client (MAC)

MAC is the main broker for the HttpClient. MAC does the work of sending messages, and communicating with the Telnyx Rest API.

MAC implements a static HttpClient to use for the entire application. You can instantiate the MessagingAPIClient by directly adding the x-secret.

The MAC will add the secret to the header every time a new request is made. So you can change the secret for the same instance.

//Get the full Http response from the API call
string httpstatus = mac.HttpResponse.StatusCode.ToString(); //returns OK for 200

//Reponse Status returns the status. This field is used to determine the Message.IsQueued value.
string responsemessage = mac.ReponseStatus;

//Reponse Message returns "Queued" if successful, returns the message if unsuccessful delivery
string responsemessage = mac.ReponseMessage;
Accepted Response Payload
//Get the full response payload on an accepted outbound message request
AcceptedResponsePayload arp = AcceptedResponsePayload.FromJson(mac.ReponseString);
string smsid = arp.SMSId; //Generated message ID from Telnyx
Rejected Response Payload
//Get the response error details from the mac response string if message is not queued
RejectedResponsePayload rrp = RejectedResponsePayload.FromJson(mac.ReponseString);
string errormessage = err.Message;
Master Detail Record
MessageDeliveryRecord mdr = await trc.GetMessageDeliveryRecord(msgid);
return mdr.Errors;

MIT License 2019 Bharat Bhardwaj

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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. 
.NET Core netcoreapp2.1 is compatible.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.2.4 687 6/8/2019
0.2.3 479 5/31/2019
0.2.2 465 5/30/2019
0.2.1 473 5/30/2019
0.2.0 466 5/29/2019
0.1.8 673 5/26/2019
0.1.7 471 5/25/2019
0.1.6 484 5/25/2019
0.1.5 449 5/24/2019
0.1.4 454 5/24/2019
0.1.2 457 5/24/2019
0.1.0 479 5/24/2019

SharpNyx v0.2.3
New features

MessageDeliveryRecord now contains the errors field which can be used like IEnumberable<MessageDeliveryError>.

Rejected Error contains a data type fixes for error code and success fields.