Created
June 4, 2014 09:29
-
-
Save ioleksiy/490c668126034f509329 to your computer and use it in GitHub Desktop.
Using ePochta SMS Gateway
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Rest4Net.ePochta; | |
using Rest4Net.ePochta.Responses; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ | |
// Provide yours here | |
private const string PublicKey = "public-key"; | |
private const string PrivateKey = "private-key"; | |
static void Main() | |
{ | |
// Creating a disposable API accessor | |
using (var epochta = new ePochtaProvider(PublicKey, PrivateKey)) | |
{ | |
// Sending sms | |
var result = epochta.SendSms("+12223334455", new MessageInfo("Text of sms", "Sender Title")); | |
// Informational | |
Console.WriteLine("Created campaign id: {0}", result.Id); | |
Console.WriteLine("Total price for campaign: {0}", result.Price); | |
Console.WriteLine("Currency for the price: {0}", result.PriceCurrency); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The article http://www.oleksiy.pro/2014/06/04/using-epochta-sms-gateway/