Livechat API for sending image or text to agent

Hello, I am now implementing rocket.chat, however, I wonder is there anyway to get image or text file from client side to agent side. Right now I’m using “sendmessgeLivechat” method under LivechatAPI but I could not find method about receiving image or text file from client side under this section. Anyone can help me about it? Thanks in advanced.

I believe sending images would just be a matter of adding attachment property to the message.

A bit more details would probably be needed to be very helpful though :slight_smile:

Hi,

We are looking to integrate WhatsApp communication into RocketChat’s Live chat. But the webhooks don’t show any attachments. How can we add images, video, documents and audio to the live chat system?

Here is the webhook for an image that was sent to a livechat user from an agent:

{“Id”:“cFBi7bgvqiBarkkLA”,
“Label”:“923471240626”,
“CreatedAt”:“2019-10-15T12:07:58.095Z”,
“LastMessageAt”:“2019-10-15T12:07:58.095Z”,
“Visitor”:{“Token”:“637042265296000000923471240626144”,
“Email”:[{“EmailAddress":"923471240626@WA.com”}],
“Phone”:[{“PhoneNumber”:“923471240626”}],
“Id”:“g9wHmSDyKzZLZzqik”,
“Name”:“923471240626”,
“Username”:“guest-20”},
“Agent”:{“Email”:“xyz@gmail.com”,
“Id”:“2BQtjBvpEk7pgCxmd”,
“Name”:“xyz”,
“Username”:“xyz”},
“Type”:“Message”,
“Messages”:[{“Message”:"",“SubscriptionCreationTimestamp”:“2019-10-23T04:43:24.614Z”,
“AgentId”:“2BQtjBvpEk7pgCxmd”,“Id”:“kz8kMfDNibtyuvMEm”,“Name”:null,“Username”:“xyz”}]}

This doesn’t show any link or path to any image. It would be great if I can get some help here for this.

Thank you

For the attachments we have an enterprise solution we are offering this service in with a simple bot integration in Rocket.Chat
https://rgwit.be/en/products/rocketchat/ it takes up 5 min to set up your existing number or we can provide one

It even allows you to open new chats, not like the API offered by Facebook where you can only receive new customers. Our service is cheaper than twilio

Hi there, we have solved how send-retrieve media files between our whatsapp frontend and livechat.
The focus is an undocument method using curl.

curl -X POST -H “x-visitor-token:IQQNbmKGmMRnJjwh” -F “file=@path_to_file.jpg” http://localIP:3000/api/v1/livechat/upload/iux27uPYKTSXMayn

1 Like