Send Messages & SMS from Web & Email with a URL Trick
Mac and iOS users can start iMessage conversations and send text messages from the web, email, or anywhere else a link can be clicked, by using a custom URL to launch the Messages app. Using this you can start an iMessage chat to any other iMessage user or send them an SMS through the Messages app (from an iPhone, or assuming SMS relay is setup on the Mac). This is a neat little trick that is quite similar to starting a FaceTime call from a URL or the web and it can be useful for staff directories, internal webpages, emails, HTML signatures, or even if you just want to offer a simple method of contact through a general webpage.
The secret to starting an iMessage conversation from a link is structuring the URL correctly. Those who are familiar with HTML will recognize this quickly, as it’s simply using an anchor tag with the reference being the iMessage application protocol rather than http or ftp.
Using a URL to Send an iMessage
Here are how these iMessage links may look, you can specify an email address, a phone number, or an Apple ID as the target. For example:
- imessage://email@address.com
- imessage://targetAppleID
- imessage://PhoneNumber
Thus, structuring the URL for the iMessage (or text message send from the iMessage app) would look like the following:
<a href="iMessage://4085551212">iMessage this number</a>
For a live example: hover over this link to see the URL, click on it to open message app with the provided number 408-555-5555, and no that is not a real number, but if you click on the link it will demonstrate how this URL trick works to launch the Message app to send the iMessage.
Embedded in an email could look something like the following, it’s a regular URL but the action is what’s different, triggering Messages app to launch with the recipient filled out.
Clicking on the iMessage URL will instantly launch the Messages app in OS X or iOS with the target recipient as the contact pre-filled in the message window.
As hinted before, this is really useful for internal staff directories and communications, embedding into emails, using as part of an HTML signature on the iPhone or iPad (or an HTML signature in the Mac Mail app too), or for just referencing on the wider web.
Longtime readers may recall we’ve covered a similar trick with custom links for SMS and iChat before, but now that the iMessage service has expanded broader it’s much more useful, particularly if you use it with email or an internal webpage.
can i make the user choose the number to send the message from the app itself without placing the number in the URL itself
Couldn’t get to work on iOS – tried Safari and also embedded browser on Twitter App (and I have written iOS apps…. so don’t tell me user error!)
This didn’t work for me on iOS.
However, it did work on macOS Sierra.
Not sure what everyone is complaining about, it works fine in Firefox on Sierra. Hovering shows the URL, clicking it offers to open iMessages.
FYI, you can use mailto:something for email addresses.
Does anyone know of a way to send iMessage from a windows PC? I would think there could be a windows client, but haven’t found one yet.
Does not work with iOS at all! Even the provided link states the address is invalid. Both from an iPhone 6s and an iPad Air 2 running the latest iOS software.
The link works from a Mac but hovering does not show the URL as it states.
I use the phone number trick almost everyday, no need to use HTML or any special prefix.
Right for both emails and phone numbers, the data detectors feature in macOS and iOS will detect a phone number or email address and allow it to be dialed or emailed.
I think the article is mentioning specifically for HTML embedding the similar action, maybe HTML signatures? But is it even necessary if data detectors can pickup the number and email?
Does this include sending messages to an Android device?
Nice trick, I use this for an email sig too for phone numbers
For a phone number you can just list it and the iPhone detects and makes it a callable link. For iMessage you need the iMessage:// syntax for it to open on the mac.
Your other readers are dolts if they can’t figure this stuff out. Maybe even an iPad is too complex for some people.
I am starting to think many of these “Tips & Tricks” by Horowitz,
are simply click-bait
Still can’t get many of them to actually work
And NO, it is NOT USER ERROR
You can’t get them to work, but they work for everyone else. Hmm. That’s the very definition of user error.
Your live example doesn’t work on my Mac or my iPhone. The Mac does nothing, the iPhone states, “Safari cannot open the page because the address is invalid.”
Doing the same as yours on my iPad. I was really hoping to get this to work as I’m setting up 2 new sites and would like to integrate it..!!
I tried again and found to get it to work on the iPad I had to hold down on the link… then it brought up the options.
yeah but it still says the address is invalid when you tap “open”.