Nexmo 不发送到美国号码
Nexmo not sending to US numbers
框架:Laravel 4.2
API: Nexmo
图书馆:christian-giupponi/nexmo https://github.com/ChristianGiupponi/Laravel-4-Nexmo
我已经在我的帐户中存入了 10 美元,这意味着它不再演示了。
<?php
$response = Nexmo::sendSMS('Amazon Company', $text_data['contact_number'], $text_data['text']);
$response = json_decode($response);
if(isset($response->body->messages[0]->{'error-text'}))
{
return array(
'status' => 'fail',
'response' => $response->body->messages[0]->{'error-text'}
);
}
return array(
'status' => 'success'
);
?>
我的研究:
- 我试过发送到菲律宾号码,我成功收到了短信
- 我试过发送到美国号码,但我没有收到任何短信,我不知道为什么。
这是一个全新的 Nexmo 帐户吗?默认情况下,当您首次注册时,您只能向注册时使用的 phone 号码发送短信。在发送给其他人之前,您需要联系他们的支持以请求取消限制。我想你可以在这里做到这一点:https://help.nexmo.com/hc/en-us/requests/new
在美国,您只能使用 Nexmo 虚拟号码作为发件人,请参阅此 helpdesk article。从您发布的代码看来,您正在使用 '1FX Cash'
,这将被拒绝。
我猜你遇到了 Error code 15 - Illegal Sender
错误。
要向美国号码发送短信,您必须请求短代码或注册长号码。有关详细信息,您可以查看我在以下 link:
上的回答
希望对您有所帮助。
框架:Laravel 4.2
API: Nexmo
图书馆:christian-giupponi/nexmo https://github.com/ChristianGiupponi/Laravel-4-Nexmo
我已经在我的帐户中存入了 10 美元,这意味着它不再演示了。
<?php
$response = Nexmo::sendSMS('Amazon Company', $text_data['contact_number'], $text_data['text']);
$response = json_decode($response);
if(isset($response->body->messages[0]->{'error-text'}))
{
return array(
'status' => 'fail',
'response' => $response->body->messages[0]->{'error-text'}
);
}
return array(
'status' => 'success'
);
?>
我的研究:
- 我试过发送到菲律宾号码,我成功收到了短信
- 我试过发送到美国号码,但我没有收到任何短信,我不知道为什么。
这是一个全新的 Nexmo 帐户吗?默认情况下,当您首次注册时,您只能向注册时使用的 phone 号码发送短信。在发送给其他人之前,您需要联系他们的支持以请求取消限制。我想你可以在这里做到这一点:https://help.nexmo.com/hc/en-us/requests/new
在美国,您只能使用 Nexmo 虚拟号码作为发件人,请参阅此 helpdesk article。从您发布的代码看来,您正在使用 '1FX Cash'
,这将被拒绝。
我猜你遇到了 Error code 15 - Illegal Sender
错误。
要向美国号码发送短信,您必须请求短代码或注册长号码。有关详细信息,您可以查看我在以下 link:
上的回答希望对您有所帮助。