Twilio在twiml或webhook laravel中获得发件人数量

问题描述 投票:1回答:1

我有一个webhook,一旦触发webhook,就会保存发件人号码。如何获取触发webhook的发件人号码?

php twilio twilio-php
1个回答
2
投票

我已经找到了问题的答案。

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

© www.soinside.com 2019 - 2024. All rights reserved.