Skip to content

Instantly share code, notes, and snippets.

@twilioforkwc
Last active September 29, 2015 02:29
Show Gist options
  • Save twilioforkwc/d3f5ef46d0ec2b050c5a to your computer and use it in GitHub Desktop.
Save twilioforkwc/d3f5ef46d0ec2b050c5a to your computer and use it in GitHub Desktop.
incoming_tel_number_update.php
<?php
require_once('../Services/Twilio.php'); // Loads the library
// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACxxxxxxxxxxxx";
$token = "yyyyyyyyyyyy";
$client = new Services_Twilio($sid, $token);
foreach ($client->account->incoming_phone_numbers as $number) {
if ( $number->phone_number == "+8150xxxxyyyy") {
$number = $client->account->incoming_phone_numbers->get($number->sid);
$number->update(array(
"VoiceUrl" => "http://xxx.xxx.xxx.xxx/twiml.xml",
"FriendlyName" => "フレンドリーネームが変更されます。"
));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment