No categories

C# Synchronous

Add the API

In C# you should add the following to any .cs files that need to use the API.

using ToucanText.Api.SenderApi;

Run the Code

To use the API create a new instance of the MessageSender(); object. Replace the user name and password with your Toucan API user name and password.

MessageSender messageSender = new MessageSender("userName", "password");

Parameters

userName
String

The ToucanText user name as provided

password
String

Your password as generated during sign up

sourceAddress
String

Either an alphanumeric sender or an inbound number to use as the sender. Numbers should be specified in the format 441234567890 (note: + is not required)

destinationAddress
String

The mobile number of the destination for the message. Numbers should be specified in the format 441234567890 (note: + is not required)

message
String

The message content

Get the Code

To send a message use the SendMessage(); method. The sender address can be an alphanumeric or numeric (depending on the country).

MessageSender messageSender = new MessageSender("userName", "password");
messageSender.SendMessage("sourceAddress", "destinationAddress", "message");

ToucanText API Requirements

Target Application

The ToucanText .NET API requires a minimum of .NET Framework 4.5 or .NET Core 2.0 to operate.

From your desktop to someone's pocket

Get started with a free business trial