Skip to content
On this page

Get SMS Report GET METHOD

PARAMETERS

API URL : https://api.icsms.net/smsgateway/api/crud/status/

apikey (string : required)

apikey helps to identify the user making the request. Sign/login for your apikey

messageId (tring : required)

Message Id returing when sending SMS

EXPECTED RESPONSE

json
status - 200 ok

{   
  "id":"1234234",
  "status": "SENT",
  "mobilenumber": "233599999990",
  "destinationAddress": "ICSMS",
};

Javascript

js

var apikey = "1W3N4KHD28YCBL8M7WDG0L11N73FP28JKD5SOKD2D4KXJKCKMF"
var myHeaders = new Headers();
myHeaders.append("Authorization", `Bearer ${apikey}`);

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

var messageId = "34534546"
var url 

fetch(`${url}?messageId=${messageId}`, requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

NodeJS

js

const axios = require('axios');

let messageId = "34534546"
let apikey = "1W3N4KHD28YCBL8M7WDG0L11N73FP28JKD5SOKD2D4KXJKCKMF"
let url = "https://api.icsms.net/smsgateway/api/crud/status/"
let config = {
  method: 'get',
  url: `${url}?messageId=${messageId}`,
  headers: { 
    'Authorization': `Bearer ${apikey}`
  }
};

axios(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});



PHP

php

<?php

$curl = curl_init();

$messageId = "34534546";
$apikey = "1W3N4KHD28YCBL8M7WDG0L11N73FP28JKD5SOKD2D4KXJKCKMF";
$url = "https://api.icsms.net/smsgateway/api/crud/status/"

curl_setopt_array($curl, array(
  CURLOPT_URL => $url.'?messageId='.$messageId,
  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',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer '.$apikey
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;



Python

python

import requests


message_id = "34534546"
url = "https://api.icsms.net/smsgateway/api/crud/status/"

apikey = "1W3N4KHD28YCBL8M7WDG0L11N73FP28JKD5SOKD2D4KXJKCKMF"


headers = {
  'Authorization': 'Bearer {}'.format(apikey)
  
}

response = requests.request("GET", "{}?messageId={}".format(url, message_id), headers=headers)
print(response.json())


C#

c#

var client = new RestClient("https://api.icsms.net/smsgateway/api/crud/status/?messageId=34534546");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 1W3N4KHD28YCBL8M7WDG0L11N73FP28JKD5SOKD2D4KXJKCKMF");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Java

java

Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://api.icsms.net/smsgateway/api/crud/status/?messageId=34534546")
  .header("Authorization", "Bearer 1W3N4KHD28YCBL8M7WDG0L11N73FP28JKD5SOKD2D4KXJKCKMF")
  .asString();