Twilio发送回复消息到另一部手机

时间:2016-04-02 06:34:08

标签: php

我尝试将消息或复制消息发送到另一个号码到twilio但它似乎无法正常工作

接收者:+12345678

twilio号码:+987654321

header('Content-Type: text/html');
?>
<Response>
  <Message to="<?=$_REQUEST['+987654321']?>">
<?=htmlspecialchars(substr($_REQUEST['From'] . ": " . $_REQUEST['Body'], 0, 1600))?>
  </Message>
</Response>

请求网址

http://domain.com/twillio.php?PhoneNumber=%2B12345678

参考 https://www.twilio.com/help/faq/sms/how-do-i-forward-my-sms-messages-to-another-phone-number

任何想法?

1 个答案:

答案 0 :(得分:0)

The only thing I can think of is to double check your number formatting, especially if you're using international numbers.

You can check them against the lookup API using curl as in the following example:

curl -XGET "https://lookups.twilio.com/v1/PhoneNumbers/55-11-5525-6325?Type=carrier&Type=caller-name" -u "{AccountSid}:{AuthToken}"