Example
Look up a number for the carrier information.
Example Request
1
2
3
4
5
6
7
8
import vts
client = vts . RestClient ( '<auth_id>' , '<auth_token>' )
#Number lookup API
response = client . lookup . get ( "<your_number>" )
print ( response )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'rubygems'
require 'vts'
include vts
include vts :: Exceptions
api = RestClient . new ( "<auth_id>" , "<auth_token>" )
# Numberlookup API
begin
response = api . lookup . get ( 'your_number' )
puts response
rescue VTSRESTError => e
puts 'Exception: ' + e . message
end
1
2
3
4
5
6
7
8
9
10
11
let vts = require ( ' vts ' );
let client = new vts . Client ( ' <auth_id> ' , ' <auth_token> ' );
// Numberlookup
client . lookup . get ( " <your_number> " )
. then ( function ( response ) {
console . log ( response );
}). catch ( function ( error ) {
console . log ( error );
});
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
require 'vendor/autoload.php' ;
use vts\RestClient ;
$client = new RestClient ( "<auth_id>" , "<auth_token>" );
$client -> client -> setTimeout ( 40 );
// Numberlookup API Product
try {
$response = $client -> lookup -> get ( "<your_number>" );
print_r ( $response );
}
catch ( VTSRestException $ex ) {
print_r ( ex );
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package test ;
import java.io.IOException ;
import net.vtscom.api.exceptions.VTSRestException ;
public class Test {
public static void main ( String [] args ) {
vts . init ( "<auth_id>" , "<auth_token>" );
//Number Lookup API
try {
System . out . println ( com . vts . api . models . lookup . Number
. getter ( "<your_number>" )
. get ());
} catch ( IOException e ) {
e . printStackTrace ();
} catch ( VTSRestException e ) {
e . printStackTrace ();
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System ;
using System.Collections.Generic ;
using vts ;
using vts.Exception ;
namespace test_apps
{
class Program
{
static void Main ( string [] args )
{
var api = new VTSApi ( "<auth_id>" , "<auth_token>" );
// Number Look Up API
try
{
var response = api . Lookup . Get ( "<your_number>" );
Console . WriteLine ( response );
}
catch ( VTSRestException e )
{
Console . WriteLine ( "Exception: " + e . Message );
}
}
}
}
1
2
curl -i --user auth_id:auth_token \
https://lookup.vtscom.net/v1/Number/{ PhoneNumber} ?type= carrier
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package main
import (
"fmt"
vts "github.com/vts/vts-go/v7"
)
func main () {
client , err := vts . NewClient ( "<auth_id>" , "<auth_token>" ,
& vts . ClientOptions {})
if err != nil {
fmt . Print ( "Error" , err . Error ())
return
}
// Numberlookup
response , err := client . Lookup . Get ( "<your_number>" ,
vts . LookupParams {})
if err != nil {
fmt . Print ( "Error" , err . Error ())
return
}
fmt . Printf ( "Response: %#v \n " , response )
}
Example Request
1
2
3
4
5
6
7
8
import vts
client = vts . RestClient ( '<auth_id>' , '<auth_token>' )
#Number lookup API
response = client . lookup . get ( "<your_number>" )
print ( response )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'rubygems'
require 'vts'
include vts
include vts :: Exceptions
api = RestClient . new ( "<auth_id>" , "<auth_token>" )
# Numberlookup API
begin
response = api . lookup . get ( 'your_number' )
puts response
rescue VTSRESTError => e
puts 'Exception: ' + e . message
end
1
2
3
4
5
6
7
8
9
10
11
let vts = require ( ' vts ' );
let client = new vts . Client ( ' <auth_id> ' , ' <auth_token> ' );
// Numberlookup
client . lookup . get ( " <your_number> " )
. then ( function ( response ) {
console . log ( response );
}). catch ( function ( error ) {
console . log ( error );
});
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
require 'vendor/autoload.php' ;
use vts\RestClient ;
$client = new RestClient ( "<auth_id>" , "<auth_token>" );
$client -> client -> setTimeout ( 40 );
// Numberlookup API Product
try {
$response = $client -> lookup -> get ( "<your_number>" );
print_r ( $response );
}
catch ( VTSRestException $ex ) {
print_r ( ex );
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package test ;
import java.io.IOException ;
import net.vtscom.api.exceptions.VTSRestException ;
public class Test {
public static void main ( String [] args ) {
vts . init ( "<auth_id>" , "<auth_token>" );
//Number Lookup API
try {
System . out . println ( com . vts . api . models . lookup . Number
. getter ( "<your_number>" )
. get ());
} catch ( IOException e ) {
e . printStackTrace ();
} catch ( VTSRestException e ) {
e . printStackTrace ();
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System ;
using System.Collections.Generic ;
using vts ;
using vts.Exception ;
namespace test_apps
{
class Program
{
static void Main ( string [] args )
{
var api = new VTSApi ( "<auth_id>" , "<auth_token>" );
// Number Look Up API
try
{
var response = api . Lookup . Get ( "<your_number>" );
Console . WriteLine ( response );
}
catch ( VTSRestException e )
{
Console . WriteLine ( "Exception: " + e . Message );
}
}
}
}
1
2
curl -i --user auth_id:auth_token \
https://lookup.vtscom.net/v1/Number/{ PhoneNumber} ?type= carrier
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package main
import (
"fmt"
vts "github.com/vts/vts-go/v7"
)
func main () {
client , err := vts . NewClient ( "<auth_id>" , "<auth_token>" ,
& vts . ClientOptions {})
if err != nil {
fmt . Print ( "Error" , err . Error ())
return
}
// Numberlookup
response , err := client . Lookup . Get ( "<your_number>" ,
vts . LookupParams {})
if err != nil {
fmt . Print ( "Error" , err . Error ())
return
}
fmt . Printf ( "Response: %#v \n " , response )
}
🥳 Thank you! It means a lot to us!
Help Us Improve
Thank you so much for rating the page, we would like to get your input
for further improvements!
Thank you for your feedback!