Discussions

Ask a Question
Back to All

Example in Ruby on Rails

Hi folks.

Do you have an application example in ruby on rails sending sms?

Beforehand thank you very much!

from Venezuelan.

Admin

Thank you for the note.

Using the rest-client library you should be able to do something like this:

require 'rest-client'

RestClient.post(
    "https://platform.tillmobile.com/api/send/?username=<username>&api_key=<api_key>", 
    '{"phone": "<phone_number>", "text": "Test from Ruby"}', 
    headers={"Content Type" => "application/json"}
)

We will be adding official Ruby example to our documentation shortly!

Marked as answered by Nicholas Crafford

Can you please add the Ruby to the docs?