# Livechat API for sending image or text to agent

**URL:** <https://forums.rocket.chat/t/livechat-api-for-sending-image-or-text-to-agent/734>\
**Category:** Community Support\
**Created:** [May 8, 2018, 4:18am UTC](https://forums.rocket.chat/t/livechat-api-for-sending-image-or-text-to-agent/734 "2018-05-08T04:18:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevin1988](https://avatars.discourse-cdn.com/v4/letter/k/c4cdca/32.png) [@kevin1988](https://forums.rocket.chat/u/kevin1988)\
**Post date:** [May 8, 2018, 4:18am UTC](https://forums.rocket.chat/t/livechat-api-for-sending-image-or-text-to-agent/734/1 "2018-05-08T04:18:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![aaron.ogle](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/aaron.ogle/32/15_2.png) [@aaron.ogle](https://forums.rocket.chat/u/aaron.ogle)\
**Post date:** [May 31, 2018, 7:34pm UTC](https://forums.rocket.chat/t/livechat-api-for-sending-image-or-text-to-agent/734/2 "2018-05-31T19:34:24Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![fahad](https://avatars.discourse-cdn.com/v4/letter/f/ecccb3/32.png) [@fahad](https://forums.rocket.chat/u/fahad)\
**Post date:** [October 26, 2019, 11:57am UTC](https://forums.rocket.chat/t/livechat-api-for-sending-image-or-text-to-agent/734/3 "2019-10-26T11:57:22Z")

</div>

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](mailto:EmailAddress%22:%22923471240626@WA.com)”}],  
“Phone”:[{“PhoneNumber”:“923471240626”}],  
“Id”:“g9wHmSDyKzZLZzqik”,  
“Name”:“923471240626”,  
“Username”:“guest-20”},  
“Agent”:{“Email”:“[xyz@gmail.com](mailto: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

---

<div class="post-metadata">

**Author:** ![ruvenss.rgwit](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/ruvenss.rgwit/32/2083_2.png) [@ruvenss.rgwit](https://forums.rocket.chat/u/ruvenss.rgwit)\
**Post date:** [September 2, 2020, 7:28pm UTC](https://forums.rocket.chat/t/livechat-api-for-sending-image-or-text-to-agent/734/4 "2020-09-02T19:28:16Z")

</div>

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/](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

---

<div class="post-metadata">

**Author:** ![minix](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@minix](https://forums.rocket.chat/u/minix)\
**Post date:** [September 8, 2020, 12:08pm UTC](https://forums.rocket.chat/t/livechat-api-for-sending-image-or-text-to-agent/734/5 "2020-09-08T12:08:34Z")

</div>

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](http://localIP:3000/api/v1/livechat/upload/iux27uPYKTSXMayn)
