Bulk SMS Services

How to develop ASP.net (C#) API to Send SMS

using System
using System.IO
using System.Net
using System.Text
using System.Web
string sUser = “USERNAME”;
string spwd = “PASSWORD”;
string sNumber = Session[“Mobile”].ToString();
string sMessage = “Hi Thanks for Signing-up”;
string sSenderID = “WEBSMS”;
string sURL = “http://cloud.smsindiahub.in/vendorsms/pushsms.aspx?user=” + sUser + “&password=” + spwd + “&msisdn=” + sNumber + “&sid=” + sSenderID + “&msg=” + sMessage + “&fl=0?;
string sResponse = GetResponse(sURL);
Response.Write(sResponse);
public static string GetResponse(string sURL)
{
HttpWebRequest request = (HttpWebRequest)WebRequest
.Create(sURL);
request.MaximumAutomaticRedirections = 4;
request.Credentials = CredentialCache.DefaultCredentials;
try
{
HttpWebResponse response = (HttpWebResponse)request
.GetResponse();
Stream receiveStream = response.GetResponseStream(
);
StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8);
string sResponse = readStream.ReadToEnd();
response.Close();
readStream.Close();
return sResponse;
}
catch
{
return “”;
}
}

Note: For Transaction SMS Please add additional Parameter &gwid=2

Note: This is to update you that above code has been supplied to SMSINDIAHUB by clients. As such, accuracy is not guaranteed by SMSINDIAHUB.

Free Quote

Some of Our Top Clients;

smsindiahub clients