Last active
September 29, 2015 02:29
-
-
Save twilioforkwc/d3f5ef46d0ec2b050c5a to your computer and use it in GitHub Desktop.
incoming_tel_number_update.php
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 | |
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