plivo/plivo-ruby

Request: Add callback URL to the Send Message Example

Closed this issue · 3 comments

It would be really helpful if the Send Message Example in README.md would include info on how to supply the Callback URL.

The original documentation also does not show example how to do it. Here is their example:

response = api.messages.create(
    '14153336666',
    ['14156667777', 123_123_123_123],
    'Test Message'
  )

How would one supply the Callback url? Would it be something like this?

response = api.messages.create(
    '14153336666',
    ['14156667777', 123_123_123_123],
    'Test Message',
    { 'url' => 'http://example.com/api/confirmsms/' }

  )

Had this same issue, talked with Plivo's support team and they had this solution:

        $plivo_client.messages.create(
          'from_number',
          [to_number],
          'message',
          url: "http://example.com/api/confirmsms"
        )

@joe-plivo I'd suggest adding this example to the API Docs 😃

Will do.

API Docs is updated with this.

Thank you!