I have tried to send bulk sms in Twillio for a while.
Which I done things; Firstly, I created a service in Messaging Services page. And then, I created a notify services with message service sid in Notify Services page.
After those, I requested with Postman following cURL code.
How to do this? Do I definitely have to create binding before I send bulk sms?
curl --location --request POST 'https://notify.twilio.com/v1/Services/IS1111111111111111/Notifications' \
--header 'Authorization: Basic ZmRnZGZnZGY6ZmRnZGZn' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'Body=xyz message' \
--data-urlencode 'ToBinding=[{"binding_type":"sms", "address":"+12345"},{"binding_type":"sms", "address":"+123456"}]'
Response:
{
"code": 20001,
"message": "Can not convert incoming parameters to Notification object: Parameter 'ToBinding' is invalid",
"more_info": "https://www.twilio.com/docs/errors/20001",
"status": 400
}