With Alpha Net's simple SMS Gateway API, you can add SMS support to your software applications and websites. SMS Gateway and API can be used to provide OTP, account verifications, notifications, and reminders, among other things. Alpha SMS API adds a powerful and simple SMS capability to your projects. Add SMS functionality to School Management Software, Small Business SMS Marketing, ISP, Corporates and NGO in Bangladesh. For a Trial Account, please call +88 09613 250 250 or contact us online.
Alpha SMS API can be used by both GET and POST Method. You can send SMS from your software or application by integrating Alpha SMS API. Just follow the code samples below to send SMS API from your applications. To obtain your API Key, please login to your SMS Panel & go to "API" page, you will get your API KEY here. Now you have to follow the instructions below:
https://api.sms.net.bd/sendsms
Name | Meaning |
---|---|
api_key |
Required . Your API KEY is used to authenticate in our system. |
msg |
Required . The body content of your message. |
to |
Required . The recipient numbers. Multiple numbers must be separated by comma(,). The Number must start with country code(880) or Standard 01X. |
schedule |
Optional . The schedule date and time to send your message. Date and time must be formatted as Y-m-d H:i:s (eg. 2021-10-13 16:00:52) |
sender_id |
Optional . If you have an approved Sender ID, you can use this parameter to set your Sender ID as from in you messages. |
https://api.sms.net.bd/sendsms?api_key={YOUR_API_KEY}&msg={YOUR_MSG}&to=8801800000000,8801700000000&schedule=2021-10-13 16:00:52
{
"error": 0,
"msg": "Request successfully submitted",
"data": {
"request_id": 0000
}
}
https://api.sms.net.bd/report/request/{id}/
Name | Meaning |
---|---|
api_key |
Required . Your API KEY is used to authenticate in our system. |
https://api.sms.net.bd/report/request/{id}/?api_key={YOUR_API_KEY}
{
"error": 0,
"msg": "Success",
"data": {
"request_id": 0000,
"request_status": "Complete",
"request_charge": "0.0000",
"recipients": [
{
"number": "8801800000000",
"charge": "0.0000",
"status": "Sent"
}
]
}
}
https://api.sms.net.bd/user/balance/
Name | Meaning |
---|---|
api_key |
Required . Your API KEY is used to authenticate in our system. |
https://api.sms.net.bd/user/balance/?api_key={YOUR_API_KEY}
{
"error": 0,
"msg": "Success",
"data": {
"balance": "00.0000"
}
}
We have included code samples for sending SMS in PHP, C#, Python, Java, NodeJS etc. Choose your choice of Language from the tabs below to view SMS API Code samples.
curl -X "POST" https://api.sms.net.bd/sendsms \
-d api_key=YOUR_API_KEY \
-d msg=Test \
-d to=8801800000000
import requests
url = "https://api.sms.net.bd/sendsms"
payload = {'api_key': 'YOUR_API_KEY',
'msg': 'Test',
'to': '8801800000000'
}
response = requests.request("POST", url, data=payload)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.sms.net.bd/sendsms',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('api_key' => 'YOUR_API_KEY','msg' => 'Test','to' => '8801800000000'),
));
$response = curl_exec($curl);
curl_close($curl);
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://api.sms.net.bd/sendsms")
.multiPartContent()
.field("api_key", "YOUR_API_KEY")
.field("msg", "Test")
.field("to", "8801800000000")
.asString();
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api.sms.net.bd/sendsms',
formData: {
'api_key': 'YOUR_API_KEY',
'msg': 'Test',
'to': '8801800000000'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
//Adding Library
using System.Net.Http;
using System.Net.Http.Headers;
using Newtonsoft.Json; //Adding New Package Newtonsoft
public class Program
{
public static void Main(string[] args)
{
using (var client = new HttpClient())
{
string API_Url = "https://api.sms.net.bd/sendsms";
string API_Key = "YOUR_API_KEY";
string Text_Massage = "YOUR_MSG";
string To_Phone_Number = "NUMBER_TO_SEND";
client.BaseAddress = new Uri(API_Url);// //
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
var response = client.GetAsync("?api_key=" + API_Key + "&msg=" + Text_Massage + "&to=" + To_Phone_Number).Result;
using (HttpContent content = response.Content)
{
var bkresult = content.ReadAsStringAsync().Result;
dynamic stuff = JsonConvert.DeserializeObject(bkresult);
if (stuff.error == "0")
{
Console.WriteLine(stuff.msg);
}
else
{
Console.WriteLine("Sms Not Send, " + stuff.msg);
}
}
}
}
}
If you need help with selecting the right solution for your business, please call us at 09613-250250 within 9:00AM- 9:00PM or you can start a live chat. We are available 24/7 via live chat.
Call US Live Chat[All Registered Trademarks, Logo and Brand Names are properties of their respective owners]