{"added_on":"2023-02-14","alias":null,"api_id":"88625e5e-1c92-11e4-80aa-12313f048015","application":"/v1/Account/MA2025RK4E639VJFZAGV/Application/29986316244302815/","carrier":"vts","monthly_rental_rate":"0.80000","renewal_date":"2023-05-10","number":"17609915566","number_type":"local","region":"California, UNITED STATES","resource_uri":"/v1/Account/MA2025RK4E639VJFZAGV/Number/17609915566/","sms_enabled":true,"sms_rate":"0.00000","sub_account":null,"voice_enabled":true,"voice_rate":"0.00850"}
## Example for Number Get#require'rubygems'require'vts'includevtsincludevts::Exceptionsapi=RestClient.new("<auth_id>","<auth_token>")beginresponse=api.numbers.get('17609915566')putsresponserescueVTSRESTError=>eputs'Exception: '+e.messageend
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Example for Number getvarvts=require('vts');(functionmain(){'use strict';// If auth id and auth token are not specified, vts will fetch them from the environment variables.varclient=newvts.Client("<auth_id>","<auth_token>");client.numbers.get("17609915566",// number).then(function(response){console.log(response);},function(err){console.error(err);});})();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php/**
* Example for Number get
*/require'vendor/autoload.php';usevts\RestClient;usevts\Exceptions\VTSRestException;$client=newRestClient("<auth_id>","<auth_token>");try{$response=$client->numbers->get('17609915566');print_r($response);}catch(VTSRestException$ex){print_r($ex);}
packagenet.vtscom.api.samples.number;importjava.io.IOException;importnet.vtscom.api.VTS;importnet.vtscom.api.exceptions.VTSRestException;importnet.vtscom.api.models.number.Number;importnet.vtscom.api.models.number.Number;/**
* Example for Number get
*/classNumberGet{publicstaticvoidmain(String[]args){vts.init("<auth_id>","<auth_token>");try{Numberresponse=Number.getter("17609915566").get();System.out.println(response);}catch(VTSRestException|IOExceptione){e.printStackTrace();}}}
/**
* Example for Number Get
*/usingSystem;usingSystem.Collections.Generic;usingvts;usingvts.Exception;namespaceVTSExamples{internalclassProgram{publicstaticvoidMain(string[]args){varapi=newVTSApi("<auth_id>","<auth_token>");try{varresponse=api.Number.Get(number:"17609915566");Console.WriteLine(response);}catch(VTSRestExceptione){Console.WriteLine("Exception: "+e.Message);}}}}
// Example for Number getpackagemainimport("fmt""github.com/vts/vts-go/v7")funcmain(){client,err:=vts.NewClient("<auth_id>","<auth_token>",&vts.ClientOptions{})iferr!=nil{fmt.Print("Error",err.Error())return}response,err:=client.Numbers.Get("17609915566",)iferr!=nil{fmt.Print("Error",err.Error())return}fmt.Printf("Response: %#v\n",response)}
Example Request
1
2
3
4
5
6
7
8
9
10
11
12
13
14
importvtsauth_id="Your AUTH_ID"auth_token="Your AUTH_TOKEN"p=vts.RestAPI(auth_id,auth_token)//Getdetailsofasinglenumberparams={'number':'444444444444'# PHone number for which the details have to be retrieved
}response=p.get_number(params)printstr(response)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require'rubygems'require'vts'includevtsAUTH_ID="Your AUTH_ID"AUTH_TOKEN="Your AUTH_TOKEN"p=RestAPI.new(AUTH_ID,AUTH_TOKEN)# Get details of a single numberparams={'number'=>'444444444444'# Phone number for which the details have to be retrieved}response=p.get_number(params)printresponse
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
varvts=require('vts');varp=vts.RestAPI({authId:'Your AUTH_ID',authToken:'Your AUTH_TOKEN'});// Get details of a single numbervarparams={'number':'444444444444'// Phone number for which the details have to be retrieved};p.get_number_details(params,function(status,response){console.log('Status: ',status);console.log('API Response:\n',response);});
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?phprequire'vendor/autoload.php';usevts\RestAPI;$auth_id="Your AUTH_ID";$auth_token="Your AUTH_TOKEN";$p=newRestAPI($auth_id,$auth_token);# Get details of a single number$params=array('number'=>'444444444444'# PHone number for which the details have to be retrieved);$response=$p->get_number($params);print_r($response);?>
packagevtsexample;importjava.util.LinkedHashMap;importnet.vtscom.helper.api.client.*;importnet.vtscom.helper.api.response.number.NumberSearchFactory;importnet.vtscom.helper.exception.VTSException;publicclassApp{publicstaticvoidmain(String[]args)throwsIllegalAccessException{Stringauth_id="Your AUTH_ID";Stringauth_token="Your AUTH_TOKEN";RestAPIapi=newRestAPI(auth_id,auth_token,"v1");// Get details of a single numberLinkedHashMap<String,String>parameters=newLinkedHashMap<String,String>();parameters.put("number","444444444444");// Phone number for which the details have to be retrieved try{Numberresp=api.getNumber(parameters);System.out.println(resp);}catch(VTSExceptione){System.out.println(e.getLocalizedMessage());}}}
usingSystem;usingSystem.Collections.Generic;usingRestSharp;usingvts.API;namespaceapps{classProgram{staticvoidMain(string[]args){RestAPIvts=newRestAPI("Your AUTH_ID","Your AUTH_TOKEN");// Get details of a single numberIRestResponse<Number>res=vts.get_number(newDictionary<string,string>(){{"number","444444444444"}// Phone number for which the details have to be retrieved});Console.WriteLine(res.Content}}}
// Example for Number getpackagemainimport("fmt""github.com/vts/vts-go/v7")funcmain(){client,err:=vts.NewClient("<auth_id>","<auth_token>",&vts.ClientOptions{})iferr!=nil{fmt.Print("Error",err.Error())return}response,err:=client.Numbers.Get("17609915566",)iferr!=nil{fmt.Print("Error",err.Error())return}fmt.Printf("Response: %#v\n",response)}
Rate this page
🥳 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!