HLR phone verification API
HLR phone verification returns a simple HLR summary by default: whether the number is live, dead, out of network, or rejected because it is not a mobile number, plus the current and original network when available. Set
detailed=true when you want the full HLR response instead.- HLR: Database checks that validate if a number is active and identify its operator.
- MNP: Process to determine if a number has been ported and confirm the current carrier.
- Delivery: Mechanism for routing messages or calls to the correct destination and confirming their status.
Endpoint
POST
https://api.provero.io/api/validate/phone
Headers
Authorization:
Content-Type: application/json
Accept: application/json
Request Body
Request Payload Example (JSON)
{
"phone": "+447777777777",
"msisdn": true,
"route": "standard",
"detailed": "true"
}
Request Examples
Choose language Bash (cURL) 5 examples
userPhone="REPLACE_WITH_PHONE"
curl -X POST https://api.provero.io/api/validate/phone \
-H "Authorization: Bearer REPLACE_WITH_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "{\"phone\": \"$userPhone\"}"
import requests
userPhone = "REPLACE_WITH_PHONE"
route = "standard"
url = "https://api.provero.io/api/validate/phone"
payload = {"phone": userPhone, "route": route}
headers = {
"Authorization": "Bearer REPLACE_WITH_API_TOKEN",
"Content-Type": "application/json",
"Accept": "application/json"
}
response = requests.post(url, headers=headers, json=payload)
print(response.status_code)
print(response.text)
<?php
$userPhone = "REPLACE_WITH_PHONE";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.provero.io/api/validate/phone",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => json_encode(["phone" => $userPhone]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer REPLACE_WITH_API_TOKEN",
"Content-Type: application/json",
"Accept: application/json"
],
]);
$response = curl_exec($curl);
if (curl_errno($curl)) {
echo 'Error:' . curl_error($curl);
}
curl_close($curl);
echo $response;
$userPhone = "REPLACE_WITH_PHONE";
$response = Http::withToken('REPLACE_WITH_API_TOKEN')
->acceptJson()
->post('https://api.provero.io/api/validate/phone', [
'phone' => $userPhone,
]);
return $response->json();
const userPhone = "REPLACE_WITH_PHONE";
fetch("https://api.provero.io/api/validate/phone", {
method: "POST",
headers: {
"Authorization": "Bearer REPLACE_WITH_API_TOKEN",
"Content-Type": "application/json",
"Accept": "application/json"
},
body: JSON.stringify({ phone: userPhone })
})
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.error("Error:", error));
Response Examples
Choose response example Success 11 examples
{
"results": [
{
"to": "+1234567890",
"status": "Live",
"live": true,
"dead": false,
"outOfNetwork": false,
"currentNetwork": "Example",
"originalNetwork": "Example"
}
]
}
{
"results": [
{
"to": "+441142994062",
"status": "Rejected Landline",
"live": false,
"dead": false,
"outOfNetwork": false,
"currentNetwork": null,
"originalNetwork": null,
"hlrResponse": "REJECTED_LANDLINE",
"errorName": "NO_ERROR"
}
]
}
{
"results": [
{
"to": "+441142994062",
"originalNetwork": {},
"status": {
"groupId": 5,
"groupName": "REJECTED",
"id": 14,
"name": "REJECTED_LANDLINE",
"description": "The destination is a landline number"
},
"error": {
"groupId": 0,
"groupName": "OK",
"id": 0,
"name": "NO_ERROR",
"description": "No Error",
"permanent": false
}
}
]
}
{
"results": [
{
"to": "+1234567890",
"mccMnc": "123456",
"imsi": "",
"originalNetwork": {
"networkName": "Example",
"networkPrefix": "234",
"countryName": "Example",
"countryPrefix": "1",
"networkId": ""
},
"status": {
"groupId": 3,
"groupName": "DELIVERED",
"id": 5,
"name": "DELIVERED_TO_HANDSET",
"description": "Message delivered to handset"
},
"error": {
"groupId": 0,
"groupName": "Ok",
"id": 0,
"name": "DELIVERED_TO_HANDSET",
"description": "No Error.",
"permanent": false
}
}
]
}
{
"results": [
{
"to": "+1234567890",
"mccMnc": "123456",
"imsi": "",
"originalNetwork": {
"networkName": "Example",
"networkPrefix": "234",
"countryName": "Example",
"countryPrefix": "1",
"networkId": ""
},
"status": {
"groupId": 3,
"groupName": "DELIVERED",
"id": 5,
"name": "DELIVERED_TO_HANDSET",
"description": "Message delivered to handset"
},
"ported": true,
"portedNetwork": {
"networkName": "Example",
"networkPrefix": "234",
"countryName": "Example",
"countryPrefix": "1",
"networkId": ""
},
"error": {
"groupId": 0,
"groupName": "Ok",
"id": 0,
"name": "DELIVERED_TO_HANDSET",
"description": "No Error.",
"permanent": false
}
}
]
}
{
"results": [
{
"to": "+1234567890",
"mccMnc": "123456",
"imsi": "",
"originalNetwork": {
"networkName": "Example",
"networkPrefix": "234",
"countryName": "Example",
"countryPrefix": "1",
"networkId": ""
},
"status": {
"groupId": 1,
"groupName": "Handset errors",
"id": 27,
"name": "UNDELIVERABLE_NOT_DELIVERED",
"description": "Absent Subscriber"
},
"ported": false,
"error": {
"groupId": 1,
"groupName": "Handset errors",
"id": 27,
"name": "UNDELIVERABLE_NOT_DELIVERED",
"description": "Absent Subscriber",
"permanent": false
}
}
]
}
{
"requestError": {
"serviceException": {
"messageId": "Error message",
"code": "400"
}
}
}
{
"message": "Insufficient balance for validation request.",
"service": "phone",
"required_amount": "0.0060000000",
"current_balance": "0.0000000000"
}
{
"message": "The phone field is required.",
"errors": {
"phone": [
"The phone field is required."
]
}
}
{
"message": "The phone field must not be greater than 15 characters.",
"errors": {
"phone": [
"The phone field must not be greater than 15 characters."
]
}
}
{
"message": "The phone field must be at least 10 characters.",
"errors": {
"phone": [
"The phone field must be at least 10 characters."
]
}
}