What is filename for SMS-sent images processed by Twilio? - image

When I send an SMS to my Twilio number which includes an image, there doesn't appear to be a filename associated with the image.
I'm using Twilio Studio.
Example:
Send an SMS text with image to my Twilio number
A Twilio Studio Flow pipes the {{trigger.message.MediaUrl0}} and sends an SMS text sent to my actual phone number
The URL is of the following format https://api.twilio.com/2010-04-01/Accounts/<long-GUID-1>/Messages/<long-GUID-2>/Media/<long-GUID-3>
Clicking on this URL opens a browser pointing to a translated URL https://s3-external-1.amazonaws.com/media.twiliocdn.com/<long-GUID-1>/<long-GUID-4> and showing the original image
But no filename.
I'm trying to access the filename so I can apply a naming convention to it. How is this accessed?

The URL to download the actual media is dynamically generated.
You can refer to the blog post here:
Retrieving Twilio MMS Image URLs with Node.js

Related

Can we send file as an attachment along with message in teams programmatically?

Can we send file as an attachment along with message in teams using webhooks or api?
Currently we can send only text message using webhooks and not attach files.
I want to mimic the action in the screenshot below:-
Attach file present in the system
There are ways to first upload file to one drive and then send its link in the teams message but I do not want to use that solution.
Is there a way to directly upload file from your system as an attachment to the microsoft teams using webhook or any alternative way.
Thanks!!
Currently it is not supported to send attachments using webhook. You will need to use bot to send and receive attachments. You can refer this link.
https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/bots-filesv4

Markdown is not working in the Bot Framework Twilio channel

I am trying to create a simple bot that sends images and hyperlinks by SMS using Twilio (trial account).
I do get the reply from the bot , but none of the markdown is working, even simple markdown elements like text or bing
Sample code I am using to send the message through Twilio SMS channel:
public async Task<Message> Post([FromBody]Message message)
{
if(message.Text == "Hello")
{
string messageText = "![Sample Image](http://aka.ms/Fo983c)";
return message.CreateReplyMessage(messageText);
}
Am I missing something? The emulator displays the image and other markdown properly, but when I test using my android phone and text the Twilio number to connect to the bot, it delivers raw HTML and not the rich content.
Twilio developer evangelist here. As pointed our earlier SMS is text only, so markdown or any other formatting will not work.
I just tried sending a message from a bot, and while I get the image correctly on the emulator or webchat, on SMS I only get the URL of the image (i.e. http://aka.ms/Fo983c).
According to the documentation, this is the expected behavior as it states:
Not all channels can represent all markdown fields. As appropriate
channels will fallback to a reasonable approximation, for example,
bold will be represented in text messaging as bold
So I guess for images, it will always fallback to the URL of the image.
As for sending MMS, it appears right now the botframework doesn't support it. To be clear, Twilio itself does support MMS for US and Canada, but it seems Microsoft's implementation didn't take advantage of that right now.
Hope this helps you.
I did this when I was first trying out the framework. Sorry but I don't have that code anymore however I don't recall having to do anything special. I simply sent a picture from my phone to my twilio number and then in the message properties for the message received by the bot there was an attachment field with a URL pointing to the image sent from my phone. Then I used a regular web request to pull down the image.
The details for the attachment objects and content url fields are outlined here.
Because there's no way to emulate the SMS channel you'll have to publish the code live to be able to test it out.
Have fun!

Can you send rich text messages via Twilio?

I am trying to send a rich text message via Twilio. I am able to send regular SMS messages, but I want to include a hyperlink in the body of the text.
I tried the twilio mediaUrl to include an rtf file, but that didn't work. Including html in the body of a message doesn't work as it just sends in plain text.
I'm posting via curl to the twilio endpoints, so i'd prefer not to have to get into PHP or some other language to achieve this. I just want to send raw data to twilio and receive a rich text message back, if it's possible.
Twilio developer evangelist here.
Using Twilio you can send MMS messages to numbers in the US and Canada. When you pass a mediaUrl the file needs to be hosted somewhere publicly on the web and it will then be included within the message.
You can pass files of any of the mime types listed here, though when sending RTF the result will depend on how well the receiving device supports RTF files.
If you want to include a link, I'd recommend shortening the URL (using bit.ly or similar) and just sending it as part of the text. Most smart phones will auto link the URL. Built in SMS apps on phones don't support markup of any sort, which is why your attempt with HTML just showed the raw markup.
Let me know if this helps at all.

HTML Email Linked Resource Image Only shows in reply

Odd one here.
I am embedding an image in an email using a linked resource. It doesn't show in the original generated email but when I click on reply or forward it shows up fine.
The following happens with Outlook.com (Hotmail) and Chrome/Firefox:
It doesn't show in either the default view or reply view in IE
It shows the image in the original and the reply on my iPad native email client
It shows same as Chrome/Firefox in Opera on the iPad.
Anyone know how to fix this anomaly?
Thanks
Use a multipart email to embed the image in the email:
How to create an email with embedded images that is compatible with the most mail clients
Key Concepts of MHTML

sms to map location

does anyone know how to extract the location data from a sms? So someone's location could be marked on Google maps.
Basically they'd text a Google voice number: 'team 1: message'. Then it would email the server with the message and it would pull the lat and long from the sms.
All the info I could get was, It's done using Drupal, the Mailsave and GMap modules, some custom code to extract the lat/lon data from the message, and AQL's SMS to email service.
There is no location data included with standard SMS. This would be a huge privacy problem. You might be able to look up a location for where the number is based, but not live location.
Basically a way to do this http://www.bennadel.com/blog/1967-Cell-Phones-SMS-Twilio-Pusher-ColdFusion-And-Google-Maps-Fun.htm without cold fusion and twilio?
Or are there any tags you can include with a text to send the towers location?

Resources