Overview
Telecom Lookup Tools

List States

This function will allow you to list all states available for ordering numbers.

Post/ Get Information

URL:

https://apiv1.teleapi.net/dids/states?token=XXXXXXX

Simply send us a GET to the above URL to get an API response with the list of states. Response codes are in the menu to the left.

shell
PHP+CURL
PHP+PLAIN
RESPONSE
shell

Shell/CURL

curl -v -X GET "https://apiv1.teleapi.net/dids/states?token=XXXX"
PHP+CURL

Using PHP+CURL

<?php
$baseurl = "https://apiv1.teleapi.net/dids/states?token=XXXX";
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$retval = curl_exec($ch);
curl_close($ch);
$object = json_decode($retval);
print_r($object);
PHP+PLAIN

PHP - file_get_contents

<?php
$url = "https://apiv1.teleapi.net/dids/states?token=XXXX";
$x = file_get_contents($url);
$object = json_decode($x);
print_r($object);
RESPONSE

Successful State Listing

{
"code": 200,
"status": "success",
"data": {
"AB":"Alberta",
"AK":"Alaska",
"AL":"Alabama",
"AR":"Arkansas",
"AZ":"Arizona",
...
}
}

Example Error

{
"code": 400,
"status": "error",
"data": "Missing variable: token"
}