Sinch Developer Documentation

Building blocks to enable rich customer communication

HTTP Interface

HTTP Interface for the Sinch Number Lookup service. Read more.

How To Connect

Please find the hosts and port numbers for our Number Lookup HTTP/HTTPS server in the table below. Your username and password is available in the CAD (Client Account Details) document provided to you by your account manager.

For servers in Europe

ServerHost:Port
Primary Number Lookup HTTP Serverhttp-eu3.clxcommunications.com:3700
Backup Number Lookup HTTP Serverhttp-eu1.clxcommunications.com:3700
Primary Number Lookup HTTPS Serverhttp-eu3.clxcommunications.com:3701
Backup Number Lookup HTTPS Serverhttp-eu1.clxcommunications.com:3701

For servers in the U.S.

ServerHost:Port
Primary Number Lookup HTTP Serverhttp-us3.clxcommunications.com:3700
Backup Number Lookup HTTP Serverhttp-us2.clxcommunications.com:3700
Primary Number Lookup HTTPS Serverhttp-us3.clxcommunications.com:3701
Backup Number Lookup HTTPS Serverhttp-us2.clxcommunications.com:3701

Query Specification

Request

The request has the format:

Format

http://<username>:<password>@<server>:<port>/lookup?msisdn=[&nocache]
ParameterDescription
<username>:<password>Basic authentication parameters
<server>Authority [93.158.78.4]
<port>Port number [3700]
<msisdn>MSISDN in international format
nocacheBypass cache function (optional)

Response

One of the responses when using Number Portability Lookup service:

Example 1

result=<result>;imsi=<imsi>

Example 2

result=<result>;imsi=<imsi>;location=<location>

Response when using the Real-Time Lookup service:

result=<result>;imsi=<imsi>;location=<location>
ParameterDescription
<result>Lookup result (Response Code)
<imsi>MCC+MNC corresponding to the MSISDN (only included when result is OK)
<location>Country Code of current handset location (only included when result is OK)

Response Codes

ResultDescription
OKThe request was successful
DATA_MISSINGThe data was missing
UNKNOWN_SUBSCRIBERThe subscriber is unknown
CALL_BARREDThe service is restricted by the destination network
ABSENT_SUBSCRIBER_SMThe subscriber is absent
UNEXPECTED_DATA_VALUEAn unexpected data value in the request
SYSTEM_FAILUREA system failure occurred in the HLR
FACILITY_NOT_SUPPORTEDShort message facility is not supported
TELE_SERVICE_NOT_PROVISIONEDSMS teleservice is not provisioned
HLR_REJECTThe HLR request was rejected
HLR_ABORTThe HLR (or some other entity) aborted the request. No response to the request was received
HLR_LOCAL_CANCELNo response for the HLR request was received
TIMEOUTNo response to the request was received
REQUEST_THROTTLEDMaximum ongoing requests exceeded
IMSI_LOOKUP_BLOCKEDRequest is blocked
Mandatory parameter msisdn not foundSome mandatory parameter are missing in the request
MSISDN range is not acceptedThe number are not allowed on this service
msisdn is invalidWrong format of the MSISDN parameter

Examples

HTTP Request

Request

http://username:[email protected]:3700/lookup?msisdn=46708100100

HTTP Request with cache function bypass

Successful response, Number Portability Lookup

Successful response

result=OK;imsi=24008

or

result=OK;imsi=24008;location=46

Unsuccessful response

Unsuccessful response

result=UNKNOWN_SUBSCRIBER

Request with successful response, using curl

$ curl -v -u user:password http://93.158.78.4:3700/lookup?msisdn=46708100200
* About to connect() to 93.158.78.4 port 3700 (#0)
* Trying 93.158.78.4…
* Connected to 93.158.78.4 (93.158.78.4) port 3700 (#0)
* Server auth using Basic with user ‘user’
> GET /lookup?msisdn=46708100200 HTTP/1.1
> Authorization: Basic dXNlcjpwYXNzd29yZA==
> User-Agent: curl/7.30.0
> Host: 93.158.78.4:3700
> Accept: */*
>
< HTTP/1.1 200 OK, Success
< Date: Mon, 12 Feb 2014 11:00:41 +0100
< Content-Length: 20
< Content-Type: text/plain; charset=ISO-8859-1
<
* Connection #0 to host 93.158.78.4 left intact

result=OK;imsi=24004

Edit on GitHub

Updated 2 months ago



HTTP Interface


HTTP Interface for the Sinch Number Lookup service. Read more.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.