<?php // Get the PHP helper library from twilio.com/docs/php/install require_once '/path/to/vendor/autoload.php'; // Loads the library use Twilio\Rest\Client; // Your Account Sid and Auth Token from twilio.com/user/account $sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; $token = "your_auth_token"; $client = new Client($sid, $token); // Get an object from its sid. If you do not have a sid, // check out the list resource examples on this page $callerId = $client->outgoingCallerIds("PNe905d7e6b410746a0fb08c57e5a186f3")->fetch(); echo $callerId->phoneNumber;
<?php // Get the PHP helper library from twilio.com/docs/php/install require_once '/path/to/vendor/autoload.php'; // Loads the library use Twilio\Rest\Client; // Your Account Sid and Auth Token from twilio.com/user/account $sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; $token = "your_auth_token"; $client = new Client($sid, $token); // Get an object from its sid. If you do not have a sid, // check out the list resource examples on this page $callerId = $client->outgoingCallerIds("PNe536d32a3c49700934481addd5ce1659")->update(array("friendlyName" => "My Second Line")); echo $callerId->phoneNumber;
<?php // Get the PHP helper library from twilio.com/docs/php/install require_once '/path/to/vendor/autoload.php'; // Loads the library use Twilio\Rest\Client; // Your Account Sid and Auth Token from twilio.com/user/account $sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; $token = "your_auth_token"; $client = new Client($sid, $token); $client->outgoingCallerIds("PNe536d32a3c49700934481addd5ce1659")->delete();