<?php# Available in versions >= 4.29.0 (https://github.com/plivo/plivo-php/releases/tag/v4.29.0)require'/etc/plivo-php/vendor/autoload.php';usePlivo\RestClient;$client=newRestClient("<auth_id>","<auth_token>");$client->client->setTimeout(60);try{$res=$client->campaign->listNumber("<campaign_id>");print_r($res);}catch(PlivoRestException$ex){print_r($ex);}?>
packagecom.plivo.examples;importcom.plivo.api.Plivo;importcom.plivo.api.models.campaign.CampaignNumbers;publicclassPlivoTest{publicstaticvoidmain(String[]args){Plivo.init("<auth_id>","<auth_token>");// Get Campaign Number Detailtry{CampaignNumbersresponse=CampaignNumbers.getNumber("<Campaign_ID>").number("<number>").get();System.out.println(response);}catch(Exceptione){e.printStackTrace();}}}
// Available in versions >= 5.9.0 (https://github.com/plivo/plivo-dotnet/releases/tag/v5.9.0)usingSystem;usingSystem.Collections.Generic;usingPlivo;usingPlivo.Exception;namespacedotnet_project{classTen_dlc{staticvoidMain(string[]args){varapi=newPlivoApi("<auth_id>","<auth_token>");// Get NumberConsole.WriteLine("Get a Number");try{varresponse=api.Campaign.GetNumber("campaign_id","<number>");Console.WriteLine(response);}catch(PlivoRestExceptione){Console.WriteLine("Exception: "+e.Message);}}}}
packagemainimport("fmt""os"plivo"github.com/plivo/plivo-go")funcmain(){client,err:=plivo.NewClient("<auth_id>","<auth_token>",&plivo.ClientOptions{})iferr!=nil{panic(err)}//Get Campaign Numberresponse,err:=client.Campaign.NumberGet("<Campaign_ID>","<phone_ number>")iferr!=nil{fmt.Printf("Error occurred while getting number detail. error:%+v\n",err)os.Exit(1)}else{fmt.Printf("%+v\n",response)}}
<?php# Available in versions >= 4.29.0 (https://github.com/plivo/plivo-php/releases/tag/v4.29.0)require'/etc/plivo-php/vendor/autoload.php';usePlivo\RestClient;$client=newRestClient("<auth_id>","<auth_token>");$client->client->setTimeout(60);try{$res=$client->campaign->listNumber("<campaign_id>");print_r($res);}catch(PlivoRestException$ex){print_r($ex);}?>
packagecom.plivo.examples;importcom.plivo.api.Plivo;importcom.plivo.api.models.campaign.CampaignNumbers;publicclassPlivoTest{publicstaticvoidmain(String[]args){Plivo.init("<auth_id>","<auth_token>");// Get Campaign Number Detailtry{CampaignNumbersresponse=CampaignNumbers.getNumber("<Campaign_ID>").number("<number>").get();System.out.println(response);}catch(Exceptione){e.printStackTrace();}}}
// Available in versions >= 5.9.0 (https://github.com/plivo/plivo-dotnet/releases/tag/v5.9.0)usingSystem;usingSystem.Collections.Generic;usingPlivo;usingPlivo.Exception;namespacedotnet_project{classTen_dlc{staticvoidMain(string[]args){varapi=newPlivoApi("<auth_id>","<auth_token>");// Get NumberConsole.WriteLine("Get a Number");try{varresponse=api.Campaign.GetNumber("campaign_id","<number>");Console.WriteLine(response);}catch(PlivoRestExceptione){Console.WriteLine("Exception: "+e.Message);}}}}
packagemainimport("fmt""os"plivo"github.com/plivo/plivo-go")funcmain(){client,err:=plivo.NewClient("<auth_id>","<auth_token>",&plivo.ClientOptions{})iferr!=nil{panic(err)}//Get Campaign Numberresponse,err:=client.Campaign.NumberGet("<Campaign_ID>","<phone_ number>")iferr!=nil{fmt.Printf("Error occurred while getting number detail. error:%+v\n",err)os.Exit(1)}else{fmt.Printf("%+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!