Examples of email and SMS verification messages using OneSignal, including one-time passwords, magic links, and double opt-in flows with templates and API examples.
custom_data
through the APIcustom_data
property which you can use to pass data from your server into the message.
Depending on how you generate the confirmation code, magic link, or custom URL, once you do, you can pass it into the custom_data
object when sending a message to your users. For example:
Verification email example
Drag and Drop editor example
OTP styled in bold within the email content
custom_data
.
In the Button block > Content Properties > Action > Url, set:
{{message.custom_data.verify.URL}}
Custom URL setting in Button block
template_id
within your Create notification API requests with custom_data
property.OTP Template
.
{{message.custom_data.verify.otp}} is your OneSignal verification code.
template_id
within your Create notification API requests with custom_data
property.