Twilio SMS 网关中的 phone 号码无效
Invalid from phone number in Twilio SMS gateway
我正在使用 Twilio SMS 网关。我使用印度国家代码 +91 和我的印度 phone 号码。如屏幕截图所示,我收到错误消息。
这是我的代码:
<?php
require __DIR__ . '/vendor/autoload.php';
use Twilio\Rest\Client;
$account_sid = '#######################';
$auth_token = '#######################';
$twilio_number = '+91**********';
$client = new Client($account_sid, $auth_token);
$client->messages->create(
// Where to send a text message (your cell phone?)
'+91**********',
array(
'from' => $twilio_number,
'body' => 'I sent this message in under 10 minutes!'
)
);
?>
谁能帮忙,为什么我收到这个错误?
如果您的项目仍处于试用模式,您需要将目的地 phone 号码添加到您的 twillio 帐户仪表板中经过验证的来电显示
实际上,我们要在登录后购买号码:
所以,已经购买的号码显示在这里:https://www.twilio.com/console/phone-numbers/incoming
如果我们想买新的,我们可以从这里购买:https://www.twilio.com/console/phone-numbers/incoming
所以,问题是我们必须从我们从帐户购买的号码中输入。对我来说它是这样工作的。
我正在使用 Twilio SMS 网关。我使用印度国家代码 +91 和我的印度 phone 号码。如屏幕截图所示,我收到错误消息。
这是我的代码:
<?php
require __DIR__ . '/vendor/autoload.php';
use Twilio\Rest\Client;
$account_sid = '#######################';
$auth_token = '#######################';
$twilio_number = '+91**********';
$client = new Client($account_sid, $auth_token);
$client->messages->create(
// Where to send a text message (your cell phone?)
'+91**********',
array(
'from' => $twilio_number,
'body' => 'I sent this message in under 10 minutes!'
)
);
?>
谁能帮忙,为什么我收到这个错误?
如果您的项目仍处于试用模式,您需要将目的地 phone 号码添加到您的 twillio 帐户仪表板中经过验证的来电显示
实际上,我们要在登录后购买号码:
所以,已经购买的号码显示在这里:https://www.twilio.com/console/phone-numbers/incoming
如果我们想买新的,我们可以从这里购买:https://www.twilio.com/console/phone-numbers/incoming
所以,问题是我们必须从我们从帐户购买的号码中输入。对我来说它是这样工作的。