<?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{$callback=array("url"=>"https://<yourdomain>.com/tendlc_status/","method"=>"POST");$res=$client->campaign->linkNumber("<campaign_id>",["<number>"],$callback);print_r($res);}catch(PlivoRestException$ex){print_r($ex);}?>
packagecom.plivo.examples;importcom.plivo.api.Plivo;importcom.plivo.api.models.campaign.CampaignNumberLinkerResponse;importcom.plivo.api.models.campaign.CampaignNumbers;publicclassPlivoTest{publicstaticvoidmain(String[]args){Plivo.init("<auth_id>","<auth_token>");// Link Number to CampaignString[]numbers=newString[]{"14845197544"};try{CampaignNumberLinkerResponseresponse=CampaignNumbers.link("<Campaign_ID>","<https://<yourdomain>.com/link_number_status/>","POST",numbers).create();System.out.println(response);}catch(Exceptione){e.printStackTrace();}}}
usingSystem;usingSystem.Collections.Generic;usingPlivo;usingPlivo.Exception;namespacedotnet_project{classTen_dlc{staticvoidMain(string[]args){varapi=newPlivoApi("<auth_id>","<auth_token>");// Link Number to CampignConsole.WriteLine("Link Number to Campaign");try{varresponse=api.Campaign.LinkNumber("<campaign_id>",newList<string>(){"<number>"},"https://<yourdomain>.com/tendlc_status/","POST");Console.WriteLine(response);}catch(PlivoRestExceptione){Console.WriteLine("Exception: "+e.Message);}}}}
<?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{$callback=array("url"=>"https://<yourdomain>.com/tendlc_status/","method"=>"POST");$res=$client->campaign->linkNumber("<campaign_id>",["<number>"],$callback);print_r($res);}catch(PlivoRestException$ex){print_r($ex);}?>
packagecom.plivo.examples;importcom.plivo.api.Plivo;importcom.plivo.api.models.campaign.CampaignNumberLinkerResponse;importcom.plivo.api.models.campaign.CampaignNumbers;publicclassPlivoTest{publicstaticvoidmain(String[]args){Plivo.init("<auth_id>","<auth_token>");// Link Number to CampaignString[]numbers=newString[]{"14845197544"};try{CampaignNumberLinkerResponseresponse=CampaignNumbers.link("<Campaign_ID>","<https://<yourdomain>.com/link_number_status/>","POST",numbers).create();System.out.println(response);}catch(Exceptione){e.printStackTrace();}}}
usingSystem;usingSystem.Collections.Generic;usingPlivo;usingPlivo.Exception;namespacedotnet_project{classTen_dlc{staticvoidMain(string[]args){varapi=newPlivoApi("<auth_id>","<auth_token>");// Link Number to CampignConsole.WriteLine("Link Number to Campaign");try{varresponse=api.Campaign.LinkNumber("<campaign_id>",newList<string>(){"<number>"},"https://<yourdomain>.com/tendlc_status/","POST");Console.WriteLine(response);}catch(PlivoRestExceptione){Console.WriteLine("Exception: "+e.Message);}}}}