Open
Description
How can we help?
How do I target a specific user? I presently have a basic example to send a push notif to a set of users via the external ID but it send to like all the device, cause I know the device I'm on has an external ID of "5"
const options = {
method: "POST",
headers: {
accept: "application/json",
Authorization: `Key ${apiKey}`,
"content-type": "application/json",
},
body: JSON.stringify({
app_id: appId,
// for grouping notifs
collapse_id: "fixture_id_here",
headings: { en: "Hello from Backend" },
contents: { en: "Your message body here." },
included_segments: ["Total Subscriptions"],
target_channel: "push",
include_aliases: {
external_id: ["user1", "user2", "user3"],
},
}),
};
fetch(url, options)
.then((res) => res.json())
.then((json) => console.log(json))
.catch((err) => console.error(err));
Code of Conduct
- I agree to follow this project's Code of Conduct