How to implement SMS feature to our project? How can I add SMS feature in my shopping site? How can I send billing SMS reminder through my inventory project? How can I send OTP SMS verification using my project? These are the questions received from many students. Yes..,, We can add SMS feature in our project using SMS Gateway API.

SMS Gateway API

Using SMS payment gateway API user can send OTP SMS, Transactional SMS, Promotional SMS, Voice SMS, etc. There are a number of SMS providers who offer SMS gateway services. But none of the SMS providers free SMS API because SMS providers has to pay to mobile operators. Following are the sample SMS integration code. You can refer this and integrate to your project.

API FOR SINGLE SMS:

http://sms.bixtel.com/api/sendhttp.php?authkey=24234YmZ&mobiles=Mobile1&message=Your Message&sender=Sender Id&type=type&route=route

API FOR MULTIPLE SMS

http://sms.bixtel.com/api/sendhttp.php?authkey=Y23423l12mZ&mobiles=Mobile1,Mobile2,Mobile3,...&message=Your Message&sender=Sender Id&type=type&route=route

Parameters:

Key parameter Description
authkey 24342j544mZ Login authentication key (this key is unique for every user)
mobiles 9876543210 Mobile Number 0 or 91
message You Text Message Message you wish to send
sander Sender ID Eg: RNDSMS
type type “1” for Normal | “2” Unicode
route route “1” for Promotional | “2” for Transactional | “3” for Promo SenderId

Responses:

Key parameter Description
error error error can be null , Invalid API Key! , Invalid SenderId , Invalid API Key , Invalid Route ,Invalid Type, credits unavailable
msg_id [msg_id] msg_id : if error , then value will be null else message id (can be used to track status) credits: available credits

ASP.NET SMS API Code:

string strUrl =  "http://sms.bixtel.com/api/sendhttp.php?authkey=YmU1MTE2NjhlYmZ&mobiles=Mobile1&message=Your Message&sender=Sender Id&type=type&route=route"; 
WebRequest request = HttpWebRequest.Create(strUrl);
HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(); 
Stream s = (Stream)response.GetResponseStream();
StreamReader readStream = new StreamReader( s );
string dataString = readStream.ReadToEnd();
response.Close();
s.Close();
readStream.Close();

VB.NET SMS API code:

Dim strUrl As String
Dim strResp As String
strUrl = http://sms.bixtel.com/api/sendhttp.php?authkey=YmU1MTE2NjhlYmZ&mobiles=Mobile1&message=Your Message&sender=Sender Id&type=type&route=route
strResp = DoWebRequest(strUrl)
End Sub
'Do web Request Function
Public Function DoWebRequest(url) As String
On Error GoTo err_DoWebRequest
Dim objXML As Object
Set objXML = CreateObject("Microsoft.XMLHTTP")
objXML.Open "GET", url, False
objXML.Send
If (objXML.Status = 404) Then
DoWebRequest = "404 Error"
Else
DoWebRequest = objXML.ResponseText
End If
Set objXML = Nothing
Exit Function

err_DoWebRequest:
DoWebRequest = "ERROR"
Exit Function
End Function

PHP SMS API code:

$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,  "http://sms.bixtel.com/api/sendhttp.php?authkey=YmU1MTE2NjhlYmZ&mobiles=Mobile1&message=Your Message&sender=Sender Id&type=type&route=route";
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "user=$user&senderID=$sender
ID&receipientno=$receipientno&cid=$cid&msgtxt=$msgtxt");
$buffer = curl_exec($ch);
if(empty ($buffer))
{ echo " buffer is empty "; }
else
{ echo $buffer; } 
curl_close($ch);

Register for SMS API:

We provide cheap and best SMS package with API for your student projects. Simply register for an account, and you will automatically receive 20 free SMS credits to try our service. You can use this for eduction, ecommerce, healthcare, real estate, financial service, inventory, food order projects. Kindly fill the following form and we send you login credentials and integration details by mail.

API Preview:

Please note: This works only for India.


Buy cheap and best SMS Package:

1,000Add to cart

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.