如何验证作为callerID的Twilio子帐户中的所有数字?

如何验证作为callerID的Twilio子帐户中的所有数字?,twilio,Twilio,我有一个子帐户S1和一个电话号码S1N1。我还有一个子账户S2,有100个电话号码。我想将子帐户S2中的所有这100个电话号码添加为子帐户S1的已验证被叫号码 我如何将所有这100个电话号码添加为子帐户S2的被叫号码,而不必经历上述100次的整个过程。是否有一种方法可以验证所有这些数字,而不必重复该过程100次?您可以使用REST API编写一个脚本来完成这项工作。我不确定您使用的是哪种语言,但PHP中的一个示例是: <?php // Get the PHP helper library

我有一个子帐户S1和一个电话号码S1N1。我还有一个子账户S2,有100个电话号码。我想将子帐户S2中的所有这100个电话号码添加为子帐户S1的已验证被叫号码

我如何将所有这100个电话号码添加为子帐户S2的被叫号码,而不必经历上述100次的整个过程。是否有一种方法可以验证所有这些数字,而不必重复该过程100次?

您可以使用REST API编写一个脚本来完成这项工作。我不确定您使用的是哪种语言,但PHP中的一个示例是:

<?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 = "ACCOUNT_SID"; 
$token = "AUTH_TOKEN"; 
$client = new Services_Twilio($sid, $token);

// Loop over the list of caller_ids and echo a property for each one
foreach ($client->account->outgoing_caller_ids as $caller_id) {
    // Verify CallerID for subaccount2
}
您可以使用RESTAPI编写脚本来为您完成此操作。我不确定您使用的是哪种语言,但PHP中的一个示例是:

<?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 = "ACCOUNT_SID"; 
$token = "AUTH_TOKEN"; 
$client = new Services_Twilio($sid, $token);

// Loop over the list of caller_ids and echo a property for each one
foreach ($client->account->outgoing_caller_ids as $caller_id) {
    // Verify CallerID for subaccount2
}