C# AUTH
using (WebClient client = new WebClient())
{
client.Headers.Add("Authorization", "YOUR_ACCESS_KEY");
}
using (WebClient client = new WebClient())
{
client.Headers.Add("Authorization", "YOUR_ACCESS_KEY");
}
www.DOMAIN.com/HLR_PAGE.aspx?mobilenumber=353870000000&status=0&mncid=27201&customerid=12345
www.DOMAIN.com/REPLY_PAGE.aspx?mobilenumber=27870000000&command=Hello World Reply&sentto=27871234567
www.DOMAIN.com/DLR_PAGE.aspx?EventID=32433326&Phonenumber=27870000000&DataType=SMS &Status=DELIVRD&CustomerID=YOUR_PASSED_CUSTOMER_ID
using (WebClient client = new WebClient())
{
client.Headers.Add("Authorization", "YOUR_ACCESS_KEY");
byte[] response =
client.UploadValues("http://rest.sendmode.com/v2/hlr", new NameValueCollection()
{
{ "mobilenumber", "0870000000" }
});
string result = System.Text.Encoding.UTF8.GetString(response);
}
using (WebClient client = new WebClient())
{
client.Headers.Add("Authorization", "YOUR_ACCESS_KEY");
byte[] response =
client.UploadValues("http://rest.sendmode.com/v2/verify", new NameValueCollection()
{
{ "code", "YOUR_VERIFY_CODE" },
{ "recipient", "0870000000"}
});
string result = System.Text.Encoding.UTF8.GetString(response);
}
using (WebClient client = new WebClient())
{
client.Headers.Add("Authorization", "YOUR_ACCESS_KEY");
var postJson = new JavaScriptSerializer().Serialize(new
{
messagetext = "This is your code.",
senderid = "Sendmode",
recipient = "0870000000"
}
);
byte[] response =
client.UploadValues("https://rest.sendmode.com/v2/verify", new NameValueCollection()
{
{ "message", postJson }
});
string result = System.Text.Encoding.UTF8.GetString(response);
}
string url = string.Format("http://rest.sendmode.com/v2/credits?access_key={0}", "YOUR_ACCESS_KEY");
using (var client = new WebClient())
{
var responseString = client.DownloadString(url);
}
using (WebClient client = new WebClient())
{
client.Headers.Add("Authorization", "YOUR_ACCESS_KEY");
string[] recipients = new string[1];
recipients[0] = "0870000000
string message = "Hello World";
var postJson = new JavaScriptSerializer().Serialize(new
{
messagetext = message,
senderid = "Sendmode",
recipients = recipients
});
byte[] response =
client.UploadValues("https://rest.sendmode.com/v2/send", new NameValueCollection()
{
{ "message", postJson }
});
string result = System.Text.Encoding.UTF8.GetString(response);
}