Ideally, the case is when we send SMS to members they should be replying back and we have configured the web-hook but in the web-hook, we would like to receive a custom array or object as well this way we can redirect that text or reply of SMS to a specific group.
$account_sid = '<SID>';
$auth_token = '<AUTH_TOKEN>';
// In production, these should be environment variables. E.g.:
// $auth_token = $_ENV["TWILIO_AUTH_TOKEN"]
// A Twilio number you own with SMS capabilities
$twilio_number = "<TWILIO_NUMBER>";
$client = new Client($account_sid, $auth_token);
$result = $client->messages->create(
// Where to send a text message (your cell phone?)
'<TO_NUMBER>',
array(
'from' => $twilio_number,
'body' => 'Hello!!'
)
);
I have set message webhook so, when someone should reply on my message I can come to know via web-hook.
following is the response that I got from Twillio.
Now I want something like when someone will reply to my SMS i should get group id and other things so I can handle the object in my code.
question from:
https://stackoverflow.com/questions/65626353/twilio-web-hook-implementation-using-custom-object 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…