This repository was archived by the owner on Aug 15, 2024. It is now read-only.

Description
I cannot get his example to work: notifications/sms-quickstart/send-notification-to-number/send-notification-to-number.curl
Here is what my call looks like:
curl -X POST "https://notify.twilio.com/v1/Services/IS<My%20Private%20Value%20Here>/Notifications" --data-urlencode 'ToBinding={"binding_type":"sms", "address":"+18011234567"}' --data-urlencode 'Body=Test Message' -u 'AC1828d273602b76952c34368876b889a9:<My Token Here>'
When I run that, I get this 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
}
The key part there is "Parameter 'ToBinding' is invalid". But I have checked it letter by letter so many times. It is exactly like the example.
NOTE: I tried it first using "bindings" stored by Twilio. I seem to have no problems with that method. This command sends the text message just fine:
curl -X POST "https://notify.twilio.com/v1/Services/IS<My%20Private%20Value%20Here/Notifications" --data-urlencode 'Identity=00000001' --data-urlencode 'Body=Test Message' -u 'AC1828d273602b76952c34368876b889a9:<My Token Here>'
Note: I posted this on Stack Overflow and someone there suggested I ask the Twilio developers.