twilio / authy-ruby

**Deprecated** Ruby library to access the authy API
MIT License
156 stars 47 forks source link

Need locale parameter for the ruby API #23

Closed BilalReffas closed 6 years ago

BilalReffas commented 8 years ago

The REST API Provides to send a locale code. But the Ruby API don't work with the locale code.

curl 'https://api.authy.com/protected/json/phones/verification/start?api_key=XXX' \ -d via='sms' \ -d phone_number='111-111-1111' \ -d country_code=1 \ -d locale='es'

Thank You !

Best Regards,

Bilal

Custom Message as well would be really great !

LucasVidal commented 6 years ago

This is a community-supported plugin. We'll be happy to receive you PR.

vikramjadon921995 commented 6 years ago

Hi @BilalReffas I passed es in the locale parameter in the ruby API and the sms that i received was in spanish. So locale parameter works when passed in the ruby API for the SMS that is sent in the mobile. However the response returned on our server was in english shown below:

{"success"=> true, "message" => "SMS token was sent", "cellphone"=> "+91-XXX-XXX-XX81"}

If you require this response on the server to be in the language specified in the locale parameter. We can go further and work on it. Let me know if that is actually what is required.

For now I have created a PR to update readme for locale support while sending SMS. https://github.com/authy/authy-ruby/pull/37/files