Trigger an SMS from your app with pre-filled text and number
Today it’s really common to ask your users to text you to start a conversation, redeem a prize, or get information from you.
But asking them to go open their SMS application, enter your number, an add the text are all actions that create friction.
Luckily, there’s a web intent link that handles this for us, you can create an <a></a>
tag with an
sms intent and add both the number and the starting text you want it to have:
<a href="sms://012345678?&body=SUBSCRIBE NOW">Text SUBSCRIBE NOW to 012345678</a>
It will open your SMS application, add that text to the body, and will let you send it to the number you already have there.
Known Issues
There’s something I saw when testing this on Android, if your default SMS app is set to Facebook’s Messenger instead of the regular Messages app, it will add // before the number and won’t render the starting case, or at least that was the case in my Motorola.
When using the regular SMS application it works well.