I'm unable to fetch response or send request to exotel sms api using the provided documentation on exotel rubygem http://www.rubydoc.info/gems/exotel/0.2
The documentations says to fetch response as follows:
sms = Exotel::Sms.details(sms_id)
But when I do that with an sms_id, ex. sms_id='12345678901234567890' like
sms = Exotel::Sms.details("12345678901234567890")
it gives an error
TypeError: no implicit conversion of HTTParty::Response into String
I do have httparty gem installed. How to solve this?
The library is tested with
0.9.0version ofhttpartythat used to respond withHashfor http requests and the code is assuming it isstringif not Hash and that is why it is failingHere is the line causing the problem
exotel/response.rb
Quick fix would be to use 'httparty=0.9.0'
You may do it by using
Here is a working sample code, please update the account_sid and token with yours