You can create QR codes that open a user's messaging app with a Mobile Commons short code and message body prefilled. This is useful for promoting text-to-join campaigns at events, on printed materials, or on signage.
Recommended SMS URI Format
Use the following format:
sms://SHORTCODE?&body=KEYWORD Message text
For example:
sms://77547?&body=OK GO Now hit send!
When scanned, the messaging app should be prefilled with:
-
To:
77547 -
Message:
OK GO Now hit send!
The additional message text can be used to give users instructions, such as "Now hit send!" or "Send this text".
Important: Do Not Use a Semicolon
Do not include a semicolon (;) between the short code and the ?.
Incorrect:
sms://77547;&body=OK GO Now hit send!
Also avoid:
sms://77547;?&body=OK GO Now hit send!
On some Android devices, the semicolon can cause the entire string to be interpreted as the recipient, rather than separating the destination number from the message body.
Use:
sms://77547?&body=OK GO Now hit send!
Examples
LORDE:
sms://77547?&body=LORDE Send this text
BILLIE:
sms://77547?&body=BILLIE Send this text
OK GO:
sms://77547?&body=OK GO Now hit send!
URL Encoding
If the message contains characters that have special meaning in a URL, they should be URL-encoded to ensure the link works correctly.
For example, spaces can be encoded as %20:
sms://77547?&body=OK%20GO%20Now%20hit%20send!
Testing
Because SMS URI behavior can vary between devices and messaging applications, test the QR code on the devices your audience is likely to use, including Android and iOS devices.
When creating new QR codes, use the recommended format and avoid cloning older QR codes that may contain the semicolon-based format.
Quick Reference
| Format | |
|---|---|
| Correct | sms://77547?&body=KEYWORD Message |
| Incorrect | sms://77547;&body=KEYWORD Message |
| Incorrect | sms://77547;?&body=KEYWORD Message |
Using the correct format ensures the short code is populated in the To field and the keyword and instructions are populated in the message body.