1

我正在尝试按照此页面上显示的说明操作:https ://www.twilio.com/docs/api/rest/outgoing-caller-ids 到verify一个号码并将该号码添加到我的 twilio 帐户作为caller ID.

但是,当我在浏览器中打开我的 PHP 页面时,我的ValidationCode页面中看不到任何可以通过手机输入的内容!

我的账户是一个完整的账户,里面有信用,所以问题不在于那个。

此外,当我打开我的 PHP 页面时,提供的电话号码会响起,但如上所述,我在我的 php 页面中看不到任何验证码,无法使用它来验证号码!

这是我在上面的页面中使用的代码:

<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('path/to/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; 
$token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; 
$client = new Services_Twilio($sid, $token);

$caller_id = $client->account->outgoing_caller_ids->create("+44myphonenumber", array(
        "FriendlyName" => "Michelle"
    ));
echo $caller_id->sid;
?>

有人可以就这个问题提出建议吗?

4

1 回答 1

0

这是 twilio 支持告诉我在我的 php 代码底部使用的内容,它运行良好:

echo $caller_id->validation_code;
于 2015-06-10T13:46:10.547 回答