dpqy77560 2015-01-07 13:37
浏览 114
已采纳

我可以与Twilio API交换信息吗?

I'm trying to identify the user who is making Twilio requests from my system. Is there a way I can encrypt the information of this user, send it to Twilio along with the allowed parameters & receive the same along with Twilio's response?

EDIT: I may not have been very clear. I'm trying to make calls using Twilio's API from a web-app (PHP). I need to send the user (who is trying to establish the call)'s details & our API key to Twilio so that I can identify the user when I receive the response from Twilio.

  • 写回答

2条回答 默认 最新

  • duanchun6148 2015-01-09 05:59
    关注

    You can include custom URL parameters in Twilio's webhook callback URL. Although the Twilio system itself will not make use of this information, it will be passed back to your php application when the call is answered. You can use this information to correlate the call to a user or other application specific concept. Here's an example:

    $call = $client->account->calls->create(
      '9991231234', // From a valid Twilio number
      '8881231234', // Call this number
      // Call this URL when a call connects and include the custom user_id parameter
      'http://www.yoursite.com/handle_call.php?user_id=41423’
    );
    

    You can find more information about how the Twilio REST API and webhooks work together in the Twilio Skills training.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?