Created
September 12, 2015 02:56
-
-
Save twilioforkwc/9c275cf596b6bc0cc081 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Get the PHP helper library from twilio.com/docs/php/install | |
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library | |
// Your Account Sid and Auth Token from twilio.com/user/account | |
$sid = "ACxxxxxxxxxxxx"; | |
$token = "{{ auth_token }}"; | |
$client = new Services_Twilio($sid, $token); | |
// Get an object from its sid. If you do not have a sid, | |
// check out the list resource examples on this page | |
$number = $client->account->incoming_phone_numbers->get("PNxxxxxxxxxxxxxxxx"); | |
$number->update(array( | |
"VoiceUrl" => "http://demo.twilio.com/docs/voice.xml", | |
"SmsUrl" => "http://demo.twilio.com/docs/sms.xml" | |
)); | |
echo $number->voice_url; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment