Sample Code Send SMS with HTTP API in C#
I will walk you through a quick and interesting way to send SMS using a simple C sharp Code. I wanted to make it as easy as possible for you, so I have created both, the Windows and web version in order to demonstrate the instructions that I will explain in this article. So, just follow these easy steps as I walk you through the whole process and in no time, sending SMS will be a best code.

How to Send SMS using HTTP API in C# Code?
//Your user name string user = "UR_USER"; //Your authentication key string key = "UR_KEY"; //Multiple mobiles numbers separated by comma string mobile = "9974984500"; //Sender ID,While using route4 sender id should be 6 characters long. string senderid = "SENDER"; //Your message to send, Add URL encoding here. string message = HttpUtility.UrlEncode("Test message"); //Prepare you post parameters String sbPostData = "user={userid}&key={unique_id}&mobile={mobile_no}&message=test sms&senderid={senderid}&accusage={account_usage_type_id}"; try { //Call Send SMS API string sendSMSUri = "http://temp.91bulksms.com/submitsms.jsp?"; //Create HTTPWebrequest HttpWebRequest httpWReq = (HttpWebRequest)WebRequest.Create(sendSMSUri); //Prepare and Add URL Encoded data UTF8Encoding encoding = new UTF8Encoding(); byte[] data = encoding.GetBytes(sbPostData.ToString()); //Specify post method httpWReq.Method = "POST"; httpWReq.ContentType = "application/x-www-form-urlencoded"; httpWReq.ContentLength = data.Length; using (Stream stream = httpWReq.GetRequestStream()) { stream.Write(data, 0, data.Length); } //Get the response HttpWebResponse response = (HttpWebResponse)httpWReq.GetResponse(); StreamReader reader = new StreamReader(response.GetResponseStream()); string responseString = reader.ReadToEnd(); //Close the response reader.Close(); response.Close(); } catch (SystemException ex) { MessageBox.Show(ex.Message.ToString()); }