I am sending SMS to users using Twilio SMS service, in nodejs. I am using twilio npm package.
I want to send customParams while sending the sms and get those params in webhook response when it gets delivere, so that I can update my database.
For example, something like this:
customParams: {
userId: <userid>
}
Here is my code to create the sms:
twilioClient.messages.create({
to: USER_PHONE,
body: smsBody,
messagingServiceSid: MSG_SERVICE_ID,
}).then(resp => {
console.log('SMS sent', resp)
})
Please let me know how can we possibly send sms with custom parameters.