简体   繁体   English

Twilio以twiml或webhook laravel获取发件人编号

[英]Twilio get number of sender in twiml or webhook laravel

I have a webhook that saves the sender number once the webhook is triggered. 我有一个Webhook,可在触发Webhook后保存发件人号码。 How can I get the number of the sender that triggered the webhook? 我如何获取触发Webhook的发件人号码?

I've already found the answer to my question. 我已经找到了我问题的答案。

public function receivedSms(Request $request){

   $response = new Twiml();


      echo $request['From'],
      echo $request['Body']

   return response($response)
      ->header('Content-Type', 'text/xml');
}

https://www.twilio.com/blog/2016/08/receive-sms-php-twilio.html https://www.twilio.com/blog/2016/08/receive-sms-php-twilio.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM