18
loading...
This website collects cookies to deliver better user experience
sendTag
function made available by our Web Push SDK. The tag name is arbitrary, so I’m using subscribed_to_push
as the tag for this example. You can filter users based on these tag values — something you’ll take advantage of when creating a new audience segment.subscribed_to_push
tag based on whether or not the user has push notifications enabled.{
include_phone_numbers: [“+18001234567”],
name: "Identifier for SMS",
sms_from: "Twilio phone number",
contents: {
en: "English message",
cn: "Chinese message"
}
pages/api
that exports a function that accepts an HTTP request and response object. In this example, I will set up the route to pull the phone number from the request body, but you can look up your users’ phone numbers instead.isPushNotificationsEnabled
only when the user does not have push notifications enabled.subscribed_to_push
.subscribed_to_push
is false
and the device type is SMS.