send sms to multiple recipients using SMS url in iPhone

How do I send SMS to multiple recipients using SMS url in iPhone?

I am trying this but it doesn't work. Is there any way to send or not?

<a href="sms:phone number">sms</a>

Upvotes: 13

Views: 5548

Answers (5)

kenjikato
kenjikato

Reputation: 177

Here's an updated <a> href formatting to send an SMS to multiple phone numbers tested on:

  • iOS (15.x)
  • Android (12.x)
  • macOS (12.x) using Safari, Firefox and Chrome with Messages
  • Windows (10.x) using Chrome and Firefox with Microsoft Phone Link

An example full <a> href link encoding:

 <a href="sms://open?addresses=+12223334444,+12223334445?&body=Message%20Line%201%E2%80%A8Message%20Line%202">Send SMS to multi #s</a>

Formatting breakdown:

  1. Start with the <a> href: <a href="
  2. Then SMS coding for multiple numbers: sms://open?addresses=
  3. Encode the first phone numbers country code: +1 then phone number: 2223334444
  4. Add in a comma separator: , between each additional phone number.
  5. After the last phone number add in: ?& to support both Android(?) and iOS(&).
  6. Next add in: body= to specify a pre-formatted message.
  7. Add in the pre-formatted message in URL Encoded formatting: Message%20Line%201%E2%80%A8Message%20Line%202
  8. Close the statement: ">
  9. Add in the web page clickable link text: Send SMS to multi #s
  10. Finally close the href: </a>

A couple of notes:

  • The web pages <head> must include the <meta charset="utf-8"> set properly.
  • Make sure there are no spaces between the "....." quote marks.
  • More than 4 phone numbers can fail on some systems.
  • For a multiline pre-formatted message use the Line Separator (U+2028) %E2%80%A8 URL encoding.

Upvotes: 3

Bryan
Bryan

Reputation: 1375

Use this:

sms:/open?addresses={phone number 1},{phone number 2},...

Upvotes: 12

polo7
polo7

Reputation: 57

The custom uri scheme seems to be an interesting approach to solve this problem, but we have to make specific iOS app or use an existing and compatible iPhone app, that I didn't find. Actually, only the first number of the list is used and iOS exclude all after the comma. If there are no ways to solve this, which is specific to iPhone, we have to use an SMS gateway (and pay each sms).

Hope someone have a solution.

Upvotes: 0

D0m3
D0m3

Reputation: 1501

Unfortunately, for now, there is no way to send a SMS to multiple recipients from a web app on iPhones with the sms scheme.

I believe a workaround is possible, if you specifically know the audience of your webapp. You could require the installation of a native app with a custom URL scheme, that creates the SMS upon request.
This app could register on multiplesms://, read multiple phone numbers, and create the SMS (I think this is possible from different applications I've seen on the Internet, never used them though).
So in your webapp, you could write:
<a href="multiplesms:+3581234567,+3582234567">Two numbers, no body text</a>.
But remember you would have to require the installation of the native app on your users' iPhones.

Upvotes: 1

Martin Thoma
Martin Thoma

Reputation: 136605

Try

<a href="sms:+3581234567,+3582234567">Two numbers, no body text</a> 

Source: developer.nokia.com and openmobilealliance.org (page 20)

If it doesn't work, I would try

<a href="sms:+3581234567;+3582234567">Two numbers, no body text</a> 

Upvotes: 0

Related Questions