Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Textmagic:: Rest C# Wrapper

Welcome to your new textmagic-rest-csharp wrapper! This library provides you with an easy solution to send SMS and receive replies by integrating TextMagic SMS Gateway to your C# / .NET application.

In this directory, you'll find the files you need to be able to create the library binaries and to use them in your application. To experiment with that code, several examples are provided.

What is TextMagic?

TextMagic's application programming interface (API) provides the communication link between your application and TextMagic’s SMS Gateway, allowing you to send and receive text messages and to check the delivery status of text messages you’ve already sent.

All these commands can be executed only if you provide a valid username and API password in your requests.


Add the library to your project references or install it as NuGet package.


  1. Register on TextMagic:

  2. Download TextMagic C# Wrapper class library package and reference it in your project.

In Visual Studio, you should go to Project - Add Reference window and locate dll by clicking Browse button.

In SharpDevelop, go to Project - Add Reference - .NET Assembly Browser and choose dll by clicking Browse button.

That's it! Now you can use TextMagic services as described below.

  1. Have a look at the TextMagic SMS API Documentation and use the sandbox to experiment with the different API functions and get more technical details.

  2. Write Code like:

using System;
using System.Collections.Generic;
using TextmagicRest;
using TextmagicRest.Model;

namespace textmagicsample
    class Program
        public static void Main(string[] args)

            Console.WriteLine("Check your phone ;-)");
            Console.WriteLine("Press any key to continue . . . ");
        public static void sendMessage() 
            var client = new Client("replace-with-username", "replace-with-user-api-key");
            var link = client.SendMessage("Hello from TextMagic API C# Wrapper demo application", "replace-with-phoneNumber-WithInternationalPrefix");

            if (link.Success) 
                Console.WriteLine("Message session {0} successfully sent", link.Id);
            } else 
                Console.WriteLine("Message was not sent due to following exception: " + link.ClientException.Message);

Note: replace "replace-with-username", "replace-with-user-api-key", "replace-with-phoneNumber-WithInternationalPrefix" with the credentials you got during your registration on TextMagic and a valid phone number.

  1. Have fun... :)
  2. More ready to use examples are included in the solution.


.NET 4.0 or higher

RestSharp (= 105.1.0)


Bug reports and pull requests are welcome on GitHub at


The library is available as open source under the terms of the MIT License.

You can’t perform that action at this time.