See the version list below for details.
dotnet add package SharpNyx --version 0.1.8
NuGet\Install-Package SharpNyx -Version 0.1.8
<PackageReference Include="SharpNyx" Version="0.1.8" />
paket add SharpNyx --version 0.1.8
#r "nuget: SharpNyx, 0.1.8"
// Install SharpNyx as a Cake Addin #addin nuget:?package=SharpNyx&version=0.1.8 // Install SharpNyx as a Cake Tool #tool nuget:?package=SharpNyx&version=0.1.8
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.
You can add the NuGet package or download and reference the Telnyx.dll issued in Releases. https://www.nuget.org/packages/SharpNyx
Send a message
using Telnyx.SharpNyx; //Quick instantiation TelnyxRestClient trc = new TelnyxRestClient("Q7EI8KGZJ3FrwBxMKq5zmID1"); //Call and wait for SendSMS to finish trc.SendSMSAsync(new Message("BUGSINC", "+16506003337", "Hello Telnyx")).Wait(); //Get the full Http response from the API call string httpstatus = trc.HttpResponse.StatusCode.ToString(); //returns OK //Check to see if it is queued bool isq = trc.IsQueued; //trc.Message returns "Message queued" if successful, returns the message if unsuccessful delivery string responsemessage = trc.Message;
//Get the full response payload on a successful message ResponsePayload rpl = ResponsePayload.FromJson(trc.ReponseString);
//Get the response error details from the TRC response string if message is not queued ResponseError rpl = ResponseError.FromJson(trc.ReponseString);
Outgoing Message Can be generated without specifying a source
//Send a message with just the recipient and body Message msg = new Message(); msg.ToPhoneNumber = "+16506003337"; msg.Body = "Hello Telnyx";
MIT License 2019 Bharat Bhardwaj
|Product||Versions 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.|
- Newtonsoft.Json (>= 12.0.2)
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
SharpNyx v 0.1.8
-Add secret to client header every time before sending.
-Code changes. No upstream changes required.
-From field made optional. But simple instantiator still requires From field, so no upstream changes required.
-Simpler client setup. Create messages using a different class instead of the client itself.
-Removed Http status code checks
Support for Telnyx messaging API.
-Supports all published functions for sending messages.
-Objects for error response, and successful payload response.
Rest connections via HttpClient.
Json parsing via Newtonsoft.