{"added_on":"2023-02-14","alias":null,"api_id":"88625e5e-1c92-11e4-80aa-12313f048015","application":"/v1/Account/MA2025RK4E639VJFZAGV/Application/29986316244302815/","carrier":"Plivo","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'plivo'includePlivoincludePlivo::Exceptionsapi=RestClient.new("<auth_id>","<auth_token>")beginresponse=api.numbers.get('17609915566')putsresponserescuePlivoRESTError=>eputs'Exception: '+e.messageend
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Example for Number getvarplivo=require('plivo');(functionmain(){'use strict';// If auth id and auth token are not specified, Plivo will fetch them from the environment variables.varclient=newplivo.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';usePlivo\RestClient;usePlivo\Exceptions\PlivoRestException;$client=newRestClient("<auth_id>","<auth_token>");try{$response=$client->numbers->get('17609915566');print_r($response);}catch(PlivoRestException$ex){print_r($ex);}
packagecom.plivo.api.samples.number;importjava.io.IOException;importcom.plivo.api.Plivo;importcom.plivo.api.exceptions.PlivoRestException;importcom.plivo.api.models.number.Number;importcom.plivo.api.models.number.Number;/**
* Example for Number get
*/classNumberGet{publicstaticvoidmain(String[]args){Plivo.init("<auth_id>","<auth_token>");try{Numberresponse=Number.getter("17609915566").get();System.out.println(response);}catch(PlivoRestException|IOExceptione){e.printStackTrace();}}}
/**
* Example for Number Get
*/usingSystem;usingSystem.Collections.Generic;usingPlivo;usingPlivo.Exception;namespacePlivoExamples{internalclassProgram{publicstaticvoidMain(string[]args){varapi=newPlivoApi("<auth_id>","<auth_token>");try{varresponse=api.Number.Get(number:"17609915566");Console.WriteLine(response);}catch(PlivoRestExceptione){Console.WriteLine("Exception: "+e.Message);}}}}
// Example for Number getpackagemainimport("fmt""github.com/plivo/plivo-go/v7")funcmain(){client,err:=plivo.NewClient("<auth_id>","<auth_token>",&plivo.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
importplivoauth_id="Your AUTH_ID"auth_token="Your AUTH_TOKEN"p=plivo.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'plivo'includePlivoAUTH_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
varplivo=require('plivo');varp=plivo.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';usePlivo\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);?>
packageplivoexample;importjava.util.LinkedHashMap;importcom.plivo.helper.api.client.*;importcom.plivo.helper.api.response.number.NumberSearchFactory;importcom.plivo.helper.exception.PlivoException;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(PlivoExceptione){System.out.println(e.getLocalizedMessage());}}}
usingSystem;usingSystem.Collections.Generic;usingRestSharp;usingPlivo.API;namespaceapps{classProgram{staticvoidMain(string[]args){RestAPIplivo=newRestAPI("Your AUTH_ID","Your AUTH_TOKEN");// Get details of a single numberIRestResponse<Number>res=plivo.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/plivo/plivo-go/v7")funcmain(){client,err:=plivo.NewClient("<auth_id>","<auth_token>",&plivo.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!