Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

"ToBinding" does not work as shown in the CURL example #798

Open
Vaccano opened this issue Sep 3, 2019 · 0 comments
Open

"ToBinding" does not work as shown in the CURL example #798

Vaccano opened this issue Sep 3, 2019 · 0 comments

Comments

@Vaccano
Copy link

Vaccano commented Sep 3, 2019

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 Private Value Here>/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 Private Value Here/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.

@Vaccano Vaccano changed the title "ToBinding" does not work as shown in the example "ToBinding" does not work as shown in the CURL example Sep 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@Vaccano and others