<?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 // You can call $client->account to access the authenticated account // you used to initialize the client and call update() on that object. $account = $client->accounts("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")->update(array('status' => 'closed')); echo $account->dateCreated->format('Y-m-d H:i:s');
<?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 // You can call $client->account to access the authenticated account // you used to initialize the client and call update() on that object. $account = $client->accounts("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")->update(array('status' => 'suspended')); echo $account->dateCreated->format('Y-m-d H:i:s');
<?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 // You can call $client->account to access the authenticated account // you used to initialize the client and call update() on that object. $account = $client->accounts("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")->update(array('status' => 'active')); echo $account->dateCreated->format('Y-m-d H:i:s');
<?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); $firstAccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; $secondAccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; // Get an object from its sid. If you do not have a sid, // check out the list resource examples on this page $number = $client->accounts($firstAccountSid)->incomingPhoneNumbers("PN2a0747eba6abf96b7e3c3ff0b4530f6e")->update(array("accountSid" => $secondAccountSid)); echo $number->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 // You can call $client->account to access the authenticated account // you used to initialize the client. // Use $client->account->fetch() to get the instance $account = $client->accounts("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")->fetch(); echo $account->dateCreated->format('Y-m-d H:i:s');
<?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); $subAccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; // Get an object from its sid. If you do not have a sid, // check out the list resource examples on this page $account = $client->accounts($subAccountSid)->fetch(); echo $account->status;