StatusCallback使用Messaging Api

StatusCallback使用Messaging Api

问题描述:

I've scoured the web searching for the proper way to add the statuscallback url with the messaging api in php.

 $sms = $client->account->messages->sendMessage($from, $to, $body);

I've tried using an keyed array after the $body variable, tried sending an image after the $body variable then using just a link and a keyed array with no success.

Any insight would be greatly appreciated.

我已经在网上搜索了使用php中的消息api添加statuscallback url的正确方法。 / p>

  $ sms = $ client-> account-> messages-> sendMessage($ from,$ to,$ body); 
  code>  pre  > 
 
 

我尝试在 $ body code>变量之后使用键控数组,尝试在 $ body code>变量之后发送图像,然后只使用一个链接 和一个键控数组没有成功。 p>

任何见解将不胜感激。 p> div>

I scoped around the Services_Twilio_Rest_Messages class and added an extra null input after the message body with the keyed array like so:

 $client->account->messages->sendMessage($from, $to, $body, null, array('StatusCallback' => '{callback url}'));