You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi folks,
For versions > 1.4.2 when calling the send_conversation_message method
channel_id = "my_channel_id"
to = "my_whatsapp_number"
client = MessageBird::Client.new('MY_ACCESS_KEY')
message = client.send_conversation_message(channel_id, to, type: 'text', content: { text: 'Hello!' })
I receive the following error:
MessageBird::ErrorException: MessageBird::ErrorException
.../gems/ruby-2.7.4/gems/messagebird-rest-3.1.1/lib/messagebird/client.rb:91:in `parse_body' when calling this method.
It is working properly for version <= 1.4.2
Thank you for helping.
The text was updated successfully, but these errors were encountered:
if you're stuck on 3.0.0 the issue is that the call expects a hash params.merge but then it calls JSON.parse in the parse_body method which expects a string. So the answer is to override the parse_body
def parse_body(body)
json = body.class == String ? body : body.to_json
super(json)
end
Hi folks,
For versions > 1.4.2 when calling the
send_conversation_message
methodI receive the following error:
It is working properly for version <= 1.4.2
Thank you for helping.
The text was updated successfully, but these errors were encountered: