MOR API user sms get

From Kolmisoft Wiki

Jump to: navigation, search


[edit] Description

Retrieves list of SMS in selected time period.

Admin - can get any user SMS.

Reseller - can get his and his users SMS.

User - can get his own SMS.

[edit] Usage

  • Call: /api/user_sms_get
  • Methods: POST, GET(if allowed, not recomended)

[edit] Parameters

Parameters which are not included into hash:

  • from - Unix timestamp of calls period starting date. (Default: Today at 00:00).
  • till - Unix timestamp of calls period end date. (Default: Today at 23:59).
  • user_id - User's ID in MOR database.
  • status_code - SMS status code. Possible values are in here
  • provider_id - Provider ID in MOR database.
  • reseller_id - Reseller's ID in MOR database.
  • destination - Prefix.
  • number - Number of destination
  • hash - SHA1 hash constructed using parameters above and API_Secret_Key ( More described in Constructing hash). Required (if setting Disable hash checking is not checked).
  • u - username for authentication. Required.

[edit] Request

If you want find status_code=301 SMS for resellers_id = 3 and user_id = 5, through provider_id=1 in period from 2007-05-05 23:59:59 till 2016-02-17 23:59:59, with prefix = 353, and phone number=353863520065

You send:

HTML POST: http://<SERVER_IP>/billing/api/user_sms_get?u=admin&from=1178323200&till=1455667200&status_code=301&provider_id=1&user_id=5&reseller_id=3&prefix=353&number=353863520065


* Note that username is not included in hash

[edit] Returns

<?xml version="1.0" encoding="UTF-8"?>
     <sending_date>2009-12-01 10:54:23 +0200</sending_date>

NOTE that calldate is in system(server) Time Zone.


  • <error>API Requests are disabled</error> – Allow API globally setting is unchecked.
  • <error>Access Denied</error> – Such username does not exist in the database or it was not specified.
  • <error>Incorrect hash</error> – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
  • <error>Sms Mesagges were not found</error> – System did not found any SMS in this time period and with these parametres.
  • <error>You are not authorized to use this functionality</error> – User do not have permission to read SMS information.


   <error>API Requests are disabled</error>

[edit] See also

Personal tools


Try M2