Get SMS Status
Using this API Origin asks SMS delivery receipt from the server.
Single Message Status
Parameters
Parameter |
Value |
Required |
apikey |
apikey provided by Libya SMS |
Yes |
secretkey |
secretkey provided by Libya SMS |
Yes |
messageid |
id provided by the termination |
Yes |
Request
curl --location --request GET 'https://api.libyasms.com:3236/getstatus?apikey=7969ea24f713e424&secretkey=c7fba893&messageid=1306952'
var client = new RestClient("https://api.libyasms.com:3236/getstatus?apikey=7969ea24f713e424&secretkey=c7fba893&messageid=1306952");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
var request = http.Request('GET', Uri.parse('https://api.libyasms.com:3236/getstatus?apikey=7969ea24f713e424&secretkey=c7fba893&messageid=1306952'));
http.StreamedResponse response = await request.send();
if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.libyasms.com:3236/getstatus?apikey=7969ea24f713e424&secretkey=c7fba893&messageid=1306952',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
kHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.libyasms.com:3236/getstatus?apikey=7969ea24f713e424&secretkey=c7fba893&messageid=1306952")
.method("GET", body)
.build();
Response response = client.newCall(request).execute();
import http.client
conn = http.client.HTTPSConnection("api.libyasms.com", 3236)
payload = ''
headers = {}
conn.request("GET", "/getstatus?apikey=7969ea24f713e424&secretkey=c7fba893&messageid=1306952", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
require "uri"
require "net/http"
url = URI("https://api.libyasms.com:3236/getstatus?apikey=7969ea24f713e424&secretkey=c7fba893&messageid=1306952")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
response = https.request(request)
puts response.read_body
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
var semaphore = DispatchSemaphore (value: 0)
var request = URLRequest(url: URL(string: "https://api.libyasms.com:3236/getstatus?apikey=7969ea24f713e424&secretkey=c7fba893&messageid=1306952")!,timeoutInterval: Double.infinity)
request.httpMethod = "GET"
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
semaphore.signal()
return
}
print(String(data: data, encoding: .utf8)!)
semaphore.signal()
}
task.resume()
semaphore.wait()
Response
{
"Status": "0",
"Text": "DELIVRD",
"Message_ID": "7777",
"Delivery Time": "1581330747547"
}
Multible Message Status
Parameters
Parameter |
Value |
Required |
apikey |
apikey provided by Libya SMS |
Yes |
secretkey |
secretkey provided by Libya SMS |
Yes |
messageid |
semicolon separated ids provided by the termination without spaces |
Yes |
Request
curl --location --request GET 'https://api.libyasms.com:3236/getmultistatus?apikey=7969ea24f713e424&secretkey=c7fba893&messageid=1306952,1306953'
var client = new RestClient("https://api.libyasms.com:3236/getmultistatus?apikey=7969ea24f713e424&secretkey=c7fba893&messageid=1306952,1306953");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
var request = http.Request('GET', Uri.parse('https://api.libyasms.com:3236/getmultistatus?apikey=7969ea24f713e424&secretkey=c7fba893&messageid=1306952,1306953'));
http.StreamedResponse response = await request.send();
if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.libyasms.com:3236/getmultistatus?apikey=7969ea24f713e424&secretkey=c7fba893&messageid=1306952,1306953',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
kHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.libyasms.com:3236/getmultistatus?apikey=7969ea24f713e424&secretkey=c7fba893&messageid=1306952,1306953")
.method("GET", body)
.build();
Response response = client.newCall(request).execute();
import http.client
conn = http.client.HTTPSConnection("api.libyasms.com", 3236)
payload = ''
headers = {}
conn.request("GET", "/getmultistatus?apikey=7969ea24f713e424&secretkey=c7fba893&messageid=1306952,1306953", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
require "uri"
require "net/http"
url = URI("https://api.libyasms.com:3236/getmultistatus?apikey=7969ea24f713e424&secretkey=c7fba893&messageid=1306952,1306953")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
response = https.request(request)
puts response.read_body
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
var semaphore = DispatchSemaphore (value: 0)
var request = URLRequest(url: URL(string: "https://api.libyasms.com:3236/getmultistatus?apikey=7969ea24f713e424&secretkey=c7fba893&messageid=1306952,1306953")!,timeoutInterval: Double.infinity)
request.httpMethod = "GET"
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
semaphore.signal()
return
}
print(String(data: data, encoding: .utf8)!)
semaphore.signal()
}
task.resume()
semaphore.wait()
Response
[
{
"Status": "0",
"Text": "DELIVRD",
"Message_ID": "7777",
"Delivery Time": "1581330747547"
},
{
"Status": "0",
"Text": "DELIVRD",
"Message_ID": "7778",
"Delivery Time": "1581330747547"
},
{
"Status": "0",
"Text": "DELIVRD",
"Message_ID": "7779",
"Delivery Time": "1581330747547"
}
]