我尝试按照此页面上显示的说明操作:https://www.twilio.com/docs/api/rest/outgoing-caller-ids至verify
一个号码,并将该号码作为caller ID
添加到我的twilio帐户。
然而,当我在浏览器中打开我的PHP页面时,我在页面中看不到任何ValidationCode
能够通过手机输入它!
我的帐户是一个完整的帐户,并且在其中有信用,所以问题不是那个。
另外,当我打开我的PHP页面时,提供的电话号码响了,但正如我上面所述,我在PHP页面中看不到任何验证码,以便能够用它来验证号码!
这是我在上面的pag中使用的代码:
<?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;
?>
有人可以就此问题提出建议吗?
答案 0 :(得分:0)
这是twilio支持告诉我在我的PHP代码底部使用它并且工作正常:
echo $caller_id->validation_code;