Real-Time Disconnect
curl --request GET \
--url https://dataapi.dncscrub.com/v1.4/Data/RealTimeDisconnect \
--header 'loginId: <loginid>'import requests
url = "https://dataapi.dncscrub.com/v1.4/Data/RealTimeDisconnect"
headers = {"loginId": "<loginid>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {loginId: '<loginid>'}};
fetch('https://dataapi.dncscrub.com/v1.4/Data/RealTimeDisconnect', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://dataapi.dncscrub.com/v1.4/Data/RealTimeDisconnect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"loginId: <loginid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://dataapi.dncscrub.com/v1.4/Data/RealTimeDisconnect"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("loginId", "<loginid>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://dataapi.dncscrub.com/v1.4/Data/RealTimeDisconnect")
.header("loginId", "<loginid>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dataapi.dncscrub.com/v1.4/Data/RealTimeDisconnect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["loginId"] = '<loginid>'
response = http.request(request)
puts response.read_body{
"Phone": "5039365190",
"Status": "connected",
"ErrorText": ""
}
Data Enhancement
Real-Time Disconnect
Check real-time phone line status to determine if a number is connected or disconnected.
GET
/
v1.4
/
Data
/
RealTimeDisconnect
Real-Time Disconnect
curl --request GET \
--url https://dataapi.dncscrub.com/v1.4/Data/RealTimeDisconnect \
--header 'loginId: <loginid>'import requests
url = "https://dataapi.dncscrub.com/v1.4/Data/RealTimeDisconnect"
headers = {"loginId": "<loginid>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {loginId: '<loginid>'}};
fetch('https://dataapi.dncscrub.com/v1.4/Data/RealTimeDisconnect', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://dataapi.dncscrub.com/v1.4/Data/RealTimeDisconnect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"loginId: <loginid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://dataapi.dncscrub.com/v1.4/Data/RealTimeDisconnect"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("loginId", "<loginid>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://dataapi.dncscrub.com/v1.4/Data/RealTimeDisconnect")
.header("loginId", "<loginid>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dataapi.dncscrub.com/v1.4/Data/RealTimeDisconnect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["loginId"] = '<loginid>'
response = http.request(request)
puts response.read_body{
"Phone": "5039365190",
"Status": "connected",
"ErrorText": ""
}
Request
Headers
string
required
Your API Key (LoginId from your DNCScrub account)
Query Parameters
string
required
10-digit phone number to check
Output parameters
| Field | Description |
|---|---|
Phone | Ten digit phone number that was queried. Example 5039367188 |
Status | See Status Table below |
ErrorText | Descriptive message of exceptional circumstance. This field is populated if Status is Error |
Status Table
| Status | Description |
|---|---|
connected | Typically connected |
connected-75 | Connected 75% of the time |
pending | Not completed yet |
disconnected | Typically disconnected |
disconnected-70 | Disconnected 70% of the time |
busy | Busy |
unreachable | Not reachable |
invalid phone | Phone not valid |
restricted | Can’t be dialed |
invalid-format | Phone or zip are not in a valid format |
invalid-phone | Phone number is not valid |
bad-zip-code | Zip code is not valid |
serverunavailable | <various messages> contact support |
ERROR | See ErrorText parameter for error message |
Example Request
curl --location --request GET \
'https://dataapi.dncscrub.com/v1.4/Data/RealTimeDisconnect
?phoneNumber=5039365190' \
--header 'loginId: YOUR_API_KEY'
const response = await fetch(
'https://dataapi.dncscrub.com/v1.4/Data/RealTimeDisconnect?phoneNumber=5039365190',
{
method: 'GET',
headers: {
'loginId': 'YOUR_API_KEY'
}
}
);
const data = await response.json();
console.log(data);
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("loginId", "YOUR_API_KEY");
var response = await client.GetAsync(
"https://dataapi.dncscrub.com/v1.4/Data/RealTimeDisconnect?phoneNumber=5039365190"
);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
{
"Phone": "5039365190",
"Status": "connected",
"ErrorText": ""
}
⌘I