Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.
This repository was 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

Description

@Vaccano

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.

Activity

  1. changed the title [-]"ToBinding" does not work as shown in the example[/-] [+]"ToBinding" does not work as shown in the CURL example[/+] on Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions