- Log-in collection opt-in form
- Coupon code promotional opt-in form
- Promotional double opt-in form
- Promotional text-to-subscribe
- Promotional text-to-subscribe via advertisement
Use OneSignal Lookup & Verify to validate phone numbers
To help keep user data clean and ensure phone numbers are valid, OneSignal offers a way to set up one-time verification codes and run checks on phone numbers. Verify APIs allows you to send one time passwords for authentication purposes. More on setting up Verify Lookup API allows you to query information on a phone number to verify users, prevent fraud, and enhance user authentication. The API provides accurate information about phone number type, carrier, country, and reachability, as well as phone number ownership, contact consent validity, and SIM card changes, without impacting user experience.Example opt-in flows
For all of these examples, you can check out a working demo available on GitHub, take a look for inspiration.
200
- success, a subscription record has been created202
- subscription record was already created
Log-in collection opt-in form
In your sign-up flows, you can collect phone numbers. Make sure to include consent boxes, that are ‘un-ticked’ by default.
Log-in Collection Opt-in
Coupon code promotional opt-in form
A coupon code promotional opt-in is a standard way to incentivize a customer to provide you with their phone number. It’s a great choice for Desktop and Mobile experiences. Because the recipients opts in only by providing their phone number, this would not be considered best practice is some locations that require a double opt-in flow.
Coupon Code Promotional Opt-in
This method for SMS collection only accounts for one form of opt-in consent. To improve account verification and follow best practices, you might want to consider implementing a Double Opt-in collection methodology like one of the options below.
Promotional double opt-in form
This option is a standard Double Opt-in flow. It works great for both Desktop and Mobile experiences. It does require turning on the Double Opt-in Prompt in Settings and setting up a keyword reply.
Promotional Double Opt-in
- Phone number collection
- OneSignal will text the
Send Message Prompt
template - OneSignal receives the keyword reply
- OneSignal sends keyword reply template, and marks the recipient as ‘subscribed’
- Ensure all message replies are properly syncing to OneSignal.
- Turn on
Send Message Prompt
and select a template - Set up a Keyword reply with a response template.
Promotional Text-to-Subscribe
This option has been shown to provide a higher rate, but it should only be implemented to display on obile devices, not desktop devices.
Promotional Text-to-Subscribe
-
The
sms:+123456789
parameter specifies that it’s an SMS link and includes the phone number. -
The
?&body=
parameter is used to include a pre-filled message. -
The text Send this message to subscribe to marketing messages and receive 15% off! [Ref:15off] is URL-encoded to ensure special characters are correctly interpreted by web browsers and mobile devices. For example:
%20
is used for spaces%25
is used for the percent symbol (%)%5B
and%5D
are used for square brackets[
and]
%3A
is used for the colon:
Promotional text-to-subscribe via advertisement
This option is great for TV ads, posters, or other forms of media. Tell your customer to text a text-to-subscribe keyword to one of your Sender Identities.
Promotional Text to Subscribe via Advertisement
Making sure your opt-in flows are compliant
Sending SMS messages is subject to regulatory oversight. In your opt-in flows, we recommend following these compliance steps:- Always include your business name: As shown in the examples, your business name should be included in every SMS message, especially in the first interaction.
- Opt-in language: Make it clear that users are opting in to receive messages from your business.
- Opt-out instructions: Provide easy opt-out options with every message (e.g., “Reply STOP to unsubscribe”).
- Message and data rates: Always include a disclaimer that standard message and data rates may apply.
- Consent not a condition of purchase: Include this disclaimer to comply with regulations and ensure transparency.
- Link to terms and privacy policy: When appropriate, include a link to your Terms of Service or Privacy Policy, especially in the initial subscription messages.
- Identify the message purpose: When appropriate, explain the types of messages you expect to send.
Managing your double opt-in prompts
If you would like to send a SMS to each new SMS subscription added. You can turn on theSend Message Prompt
setting by navigating to SMS Settings > Consent Management. This will automatically send the template selected to all new SMS subscriptions created through the API or SDKs. Subscriptions added via the CSV Importer will not receive a message prompt.
The send message prompt will send from your default Sender Identity. It’s recommended to use a Messaging Service that you have set up for transactional sending to ensure that these messages are sent in a timely manner.
Text-to-subscribe keywords
Add a keyword reply to complete the double opt flow. For example, you might use a generic text-to-subscribe keyword, a special code, or a keyword likeY
or Subscribe
.
Keywords can be any alpha-numeric value. All incoming messages will be checked for keywords, if the message has many words, we check the first word, last word, and any words between parentheses, e.g. (summer sale)
.
Requirement: Ensure that you have set up your SMS replies to automatically sync to OneSignal.
Bypassing the prompt
If you want to use Double Opt-in in some scenarios but not 100% of the time. You can bypass theSend Message Prompt
by setting the API parameter send_double_opt_in_prompt
to false
.