MessageCloud's  SMSC HLR HTTP API allows you to perform high burst HLR Lookups; HLR Lookups.

HTTP HLR refers to the method of sending your [HLR Lookup] using the HTTP GET/POST interface.

The HTTP interface to the MessageCloud SMSC has been tested and benchmarked to 100 tps, for an individual service account, using parallel HTTP requests and measuring the result with jmeter

The default service account configuration, provides 10 concurrent HTTP GET/POST connections. If your service requires a greater throughput, please contact your MessageCloud account manager.


Using a single HTTP POST operation, the external application can get HLR related parameters like current IMSI, MCC and MNC, by submitting MSISDN to SMSC platform.

The SMSC is HTTP version 1.1 compliant. All parameters in a POST request should be url-encoded. A HTTP GET Request may also be used, but is of limited use since a GET operation cannot hold more than 255 characters.


Scripts for easy HLR Lookup. Choose from our ready-made scripting languages, which offer simple modification and the ability to perform HLR Lookups.

Choose from  Java, PHP, C#/.Net, C++/CLI, VB.NET, ASP, RUBY, NodeJS, Python, Curl

View code on our  Scripts page

Find these on  GitHub


Example URL:



HTTP Post/Get Parameters


Msisdn which is need to check HLR parameters.


Account username.


Account password


Format of response. Valid values are “xml” and “json”

Values to include: 
Parameter Values 
msisdn As required 
username As provided 
password As provided 
output xml or json


Account password


A valid submission format of a message:

POST <post_url> HTTP/1.1 Host: <sms_hub host> Content-Type: application/x-www-form-urlencoded


Example: POST /checkHLR HTTP/1.1 Host: Content-Length: 63 Content-Type: application/x-www-form-urlencoded



HTTP GET Request as follows:  http://<host>:<port>/<path>?msisdn=<Msisdn>&username=<UserName>&password=<Password>&output=<xml or json>



The following response is valid for the above request: 
Response Code: OK 
Content-Length: xx 
Content-Type: text/xml 
Date: Fri, 03 Oct 2014 18:37:16 GMT 
Server: MochiWeb/1.0

<XML/JSON Output>

Return Success with XML output

<hlr result="ok"> 
<msisdn> </msisdn> 
<imsi> </imsi> 
<msc> </msc> 
<gt> </gt> 
<mcc> </mcc> 
<mnc> </mnc> 


Response Code: OK 
Content-Length: 275 
Content-Type: text/xml 
Date: Fri, 03 Oct 2014 18:37:16 GMT 
Server: MochiWeb/1.0

<hlr result="ok"> 
<imsi>23420xxxxxxxx </imsi> 
<msc>44778xxxxxxxx </msc> 
<gt>44778xxxxxxxx </gt> 

Return Success with JSON output


Response Code: OK 
Content-Length: 196 
Content-Type: text/plain 
Date: Fri, 03 Oct 2014 18:13:20 GMT 
Server: MochiWeb/1.0 

Return Error with XML output

<hlr result ="error"> 
<error> Error Code </error> 

Response Code: OK 
Content-Length: 43 
Content-Type: text/xml 
Date: Fri, 03 Oct 2014 18:36:59 GMT 
Server: MochiWeb/1.0

<hlr result ="error"><error>6</error></hlr>

Return Error with JSON output

{"result":"error","errorcode":Error Code}


Response Code: OK 
Content-Length: 32 
Content-Type: text/plain 
Date: Fri, 03 Oct 2014 18:38:34 GMT 
Server: MochiWeb/1.0 

Error Description
1 Unknown Subscriber
6 Absent Subscriber SM
9 Illegal Subscriber
11 Tele Service Not Provisioned
13 Call Barred
14 Unidentified Subscriber
21 Facility Not Supported
24 Network Failure
27 Absent Subscriber
30 SRI Timeout
31 TCAP Abort
34 System Failure
35 Data Missing
36 Unexpected Data Value
100 HTTP Error
101 Invalid Path
102 Msisdn Missing
103 Username Missing
104 Password Missing
105 Authentication Failed
106 HTTP Server Timeout
107 Unknown Response
108 SRI Server Timeout
109 SRI Server Error
110 Charging Failed
111 No SRI Provider
112 Client not found
113 SRI HTTP API not found
114 HTTP error in SRI HTTP API