INBOX (GET) - Get the Inbox Content Relating to a Phone Number

This endpoint allows you get the inbox replies as regards a phone number within a given period

Base URL

https://ussd.simhosting.ng/api/inbox/

Get the history of the transactions carried out by a phone number within a given period. All the requests are submitted through HTTPS GET method. Although you can use HTTP protocol, we strongly recommend you to submit all requests to API over HTTPS so the traffic is encrypted and the privacy is ensured.


PARAMETERS

Parameter Type Description
token string The API authentication token. This can be accessed from API Tokens' page
phone string

The phone number for which the inbox is to be queried

timeframe string

The time frame for the summary. Below are valid queries

1h = 1 hour ago

6h = 6 hours ago

12h = 12 hours ago

24h = 24 hours ago

1d = Today

1w = 1 week ago

If no time frame is supplied today's value will be returned

 
 
 

Summary Request Format  (HTTPS GET Method)

Sample PHP code to get history for a phone number

 

<?php
    $baseurl 
"https://ussd.simhosting.ng/api/inbox/?";
    
$status_array = array (

      "token" =>"API_TOKEN_HERE",
      "phone" =>"PHONE_NUMBER"
      
"timeframe" =>"TIME_FRAME"
    
     
); 
    
$status_url $ussd_base.http_build_query($status_array);
    
$response file_get_contents($status_url);
    echo 
$response// response code 
?>


 

USSD Response Format

All response are in the format below:

{json data}

 

Response on Success

{
   "success": true,
   "comment": "Inbox result loaded successfully for +2348000000000.",
   "data": [      
      {
         "from":"MTN Topit",
         "content":"Ref: 20200609072407151065803482\nDATE: 2020-06-09 07:24\nAmt: N100.00\nPrev bal: NXXX.00\nBal: NXXX\nTo: 2348000000000",
         "time":"2020-06-09 07:24:10",
         "logged":"2020-06-09 07:24:27"      
      },
      {
         "from":"MTN Topit",
         "content":"Ref: 2020060817580715106580984\nDATE: 2020-06-08 17:58\nAmt: N500.00\nPrev bal: NXXXX\nBal: NXXXXXXX\nTo: 2348000000000",
         "time":"2020-06-08 17:58:12",
         "logged":"2020-06-08 17:58:37"      
      }

]
}

 

Response on Failure

{
"success": "false",
"comment": "ADDITIONAL_COMMENT"
}

 

Tags
Image

USSD on SIMHosting is a product of HoRLaR I.T. Solutions. It automates data and airtime vending via HTTPS POST/GET requests to the hosted SIM.