TelnyxSharp 1.0.0.116

There is a newer version of this package available.
See the version list below for details.
dotnet add package TelnyxSharp --version 1.0.0.116
                    
NuGet\Install-Package TelnyxSharp -Version 1.0.0.116
                    
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="TelnyxSharp" Version="1.0.0.116" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TelnyxSharp" Version="1.0.0.116" />
                    
Directory.Packages.props
<PackageReference Include="TelnyxSharp" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TelnyxSharp --version 1.0.0.116
                    
#r "nuget: TelnyxSharp, 1.0.0.116"
                    
#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.
#:package TelnyxSharp@1.0.0.116
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TelnyxSharp&version=1.0.0.116
                    
Install as a Cake Addin
#tool nuget:?package=TelnyxSharp&version=1.0.0.116
                    
Install as a Cake Tool

TelnyxSharp

Welcome to the TelnyxSharp SDK! This library provides a simple and intuitive way to interact with the Telnyx API using .NET. 🚀

NuGet Build Status

Installation

To install the TelnyxSharp SDK, you can use the NuGet package manager:

dotnet add package TelnyxSharp

Or via the NuGet Package Manager Console:

Install-Package TelnyxSharp

Usage

Direct Initialization

Here's a quick example to get you started:

using TelnyxSharp;
using TelnyxSharp.Messaging.Models.Messages.Requests;
using TelnyxSharp.Messaging.Models.Messages.Responses;

var apiKey = "YOUR_API_KEY";
var client = new TelnyxClient(apiKey);

// Create a message request
var messageRequest = new SendMessageRequest
{
    From = "+1234567890",
    To = new List<string> { "+0987654321" },
    Text = "Hello from TelnyxSharp!"
};

// Send the message
SendMessageResponse response = await client.Messages.Send(messageRequest);

Console.WriteLine($"Message sent with ID: {response.Id}");

Using Dependency Injection

For applications using Microsoft.Extensions.DependencyInjection, you can register the Telnyx client in your service collection:

using Microsoft.Extensions.DependencyInjection;
using TelnyxSharp;

// In your Startup.cs or Program.cs
services.AddTelnyxClient(options =>
{
    options.ApiKey = "YOUR_API_KEY";
});

Then inject ITelnyxClient into your classes:

public class MessagingService
{
    private readonly ITelnyxClient _telnyxClient;

    public MessagingService(ITelnyxClient telnyxClient)
    {
        _telnyxClient = telnyxClient;
    }

    public async Task SendMessage(string to, string text)
    {
        var messageRequest = new SendMessageRequest
        {
            From = "+1234567890",
            To = new List<string> { to },
            Text = text
        };

        var response = await _telnyxClient.Messages.Send(messageRequest);
        Console.WriteLine($"Message sent with ID: {response.Id}");
    }
}

This approach is recommended for ASP.NET Core applications and other scenarios where you want to manage the lifetime of the client through dependency injection.

Contributing

We welcome contributions! Please read our contributing guidelines to get started.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
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
1.0.0.117 53 9/22/2025
1.0.0.116 45 9/22/2025
1.0.0.115 47 9/22/2025
1.0.0.114 43 9/22/2025
1.0.0.113 43 9/22/2025
1.0.0.112 46 9/22/2025
1.0.0.111 177 9/14/2025
1.0.0.110 179 9/14/2025
1.0.0.109 134 9/2/2025
1.0.0.108 124 9/2/2025
1.0.0.107 128 9/2/2025
1.0.0.106 143 7/15/2025
1.0.0.105 140 7/14/2025
1.0.0.104 147 7/2/2025
1.0.0.103 144 7/1/2025
1.0.0.102 139 7/1/2025
1.0.0.101 173 5/6/2025
1.0.0.100 178 4/23/2025
1.0.0.98 128 4/19/2025
1.0.0.97 187 3/20/2025
1.0.0.96 159 3/20/2025
1.0.0.95 165 3/20/2025
1.0.0.94 152 3/13/2025
1.0.0 165 3/13/2025