Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example of Notify usage #144

Open
dchohfi opened this issue Nov 24, 2020 · 1 comment
Open

Example of Notify usage #144

dchohfi opened this issue Nov 24, 2020 · 1 comment

Comments

@dchohfi
Copy link

dchohfi commented Nov 24, 2020

Hi, I'm trying to use the Notify service and I always get

{:error,
 %{
   "code" => 20404,
   "message" => "The requested resource /Notifications was not found",
   "more_info" => "https://www.twilio.com/docs/errors/20404",
   "status" => 404
 }, 404}

It works using cURL, the Messaging Services is created under console and I'm using the right SID.

Code used:

ExTwilio.Notify.Notification.create(%{sid: "#{sid}", to_binding: "{\"binding_type\":\"sms\", \"address\":\"#{phone}\"}", body: "Message"})

I've also tried to send the sid as service_sid but same results.
Same 404 status code for Notify Binding resources too.

@superchris
Copy link

There is a second argument that you use to pass it as [service: service_id]. Wish this had been documented took awhile to figure out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants