Use Clickatell's C# script library with our HTTP or REST messaging APIs to interact with the Clickatell SMS Gateway. The C# script below allows you to send one- or two-way SMS message using Clickatell's SMS Platform.
This script is built with .NETFramework 4.5.2
add Rest.cs and API.cs into your project from the Scripts folder
Add the Newtonsoft.JSON package to your project or the newtonsoft.json.dll file to your project
What This Class Can Do:
This script allows you to send an sms or a 2 way message using Clickatell's platform.
Using The Class:
You call the class by using
private string response; private string api; Dictionary<string, string> Params = new Dictionary<string, string>(); response = Api.SendSMS(api, Params);
Where api is your api key given to you on the platform and Params is a Dictionary of the parameters to send with the sms.
required parameters are:
to: the telephone number you are sending the sms to including the country code (must start with +)
content: the sms message that must be sent.
A full list of parameters can be found here:
You can add the parameters to the dictionary by using the following code:
Params.Add("content", "this is a message"); Params.Add("to", "+27745555555");
To add more than one number to send to multiple recipients, you will just comma delimit the numbers:
Once the sms is sent, it will return a response in the form of a JSON array.
The Json array will include an array of messages which each in turn contains:
- An API Message ID
- Whether the message was accepted or not (true / false)
- The number it was sent to
- an error message if applicable (see link below to error messages)
Reference Links and More Info:
Found a bug or missing a feature? Log it here and we will take a look.
Register a new account to send sms's:
Login to platform for API id, etc: