I can't find in Twilio documentation opportunity to send media message with file and text in one message, so maybe someone know how to send media message with file and text by Twilio Chat in one message?
Asked
Active
Viewed 567 times
0
-
Maybe it will save a few hours for someone, response from Twilio support: 'Sorry the docs are not clear, but the media message cannot contain a text body. Some developers send two messages with a custom attribute linking the two. This allows their UI to display the messages as being associated.' – I. Hryhoryshyn Jul 09 '20 at 17:24
1 Answers
0
You can send extra media message with file and text
for example, in JS you would pass in the 2nd parameter messageAttributes
http://media.twiliocdn.com/sdk/js/chat/releases/4.0.0/docs/Channel.html#sendMessage__anchor
channel.sendMessage({"image/png", mediaBuffer}, {"foo": "bar"});
So you can include arbitrary metadata about the message, as long as the receiving application also knows how to interpret and display this data.

Dipesh Shihora
- 414
- 2
- 6
- 19