Introduction

Number Validation Service (NVS) can help you clean out your client database by retrieving information on destination numbers such as Country, Network and more information.

We offer 2 services for Number Validations:

NVS

  • Validates mobile phone numbers to keep your customer data accurate and up to date.
  • Key benefit – you only pay for SMS sent to valid numbers.

NVS plus

  • Takes a step further and confirms if a phone is powered on, roaming and ported.
  • Key benefit – you can postpone sending your campaign to roaming or powered off phones.

* The main difference is that NVS Plus returns more data then NVS for every request

Authentication

To use the NVS or NVS plus services, you need to request access to Fortytwo. Once we enable the service for your account, you will get a set of credentials (username and password) which you must include with every NVS or NVS plus request.

To request access, please contact our Customer Service team at support@fortytwo.com.

Endpoints

Lookup Number

This endpoint is used to get information on a phone number. The basic information extracted from NVS includes MCC (Mobile Country Code), MNC (Mobile Network Code).

For a more detailed response, opt for NVS Plus which gives even more information such as Roaming Status, Phone Status, Porting.

Request

GET
http://nvshttp.fortytwotele.com/?username={username}&password={password}&number={phone_number}

 

The request to validate a number is made towards the following URL http://nvshttp.fortytwotele.com/ with the following parameters sent as a GET query.

Parameter Value
username The username from your bind details. This is emailed once an NVS bind is created by our team
password The password from your bind details. This is emailed once an NVS bind is created by our team
number The number you are looking to validate. Number should be in international format and can only be between 7-20 digits long. First digit cannot be a 0. All numbers must be unique within the “destinations” array

Response

The Response for the Lookup is the main difference between NVS and NVS Plus. The NVS Plus will have additional information such as Ported, Phone state, etc.

Example

GET /?username={username}&password={password}&number={phone_number} HTTP/1.1
Host: nvshttp.fortytwotele.com
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "http://nvshttp.fortytwotele.com/?username={username}&password={password}&number={phone_number}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "cache-control: no-cache"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

 

Reference