
Hi all,
Are there any examples on how to send a push notification using server sdk
?
...
const title = "Hello";
const contents = "This is a test";
await messaging.createPush(
sdk.ID.unique(), // messageId
title, // title
contents, // body
[], // topics
[order.user_id], // users
[], // targets
{
activity: "orders",
orderId: order.order_id!,
}, // data
"", // action
"[IMAGE]", // image <-- I don't know what's supposed to be here!
"[ICON]", // icon - <-- I don't know what's supposed to be here!
"", // sound
"F7941E", // color <-- With or without `#` sign?
"", // tag
"[BADGE]", // badge <-- I don't know what's supposed to be here!
false, // draft (optional)
"" // scheduledAt
);
...
How do I configure this to send an image and to configure the push notification icon (just like postmates, uber eats, etc...)?
Where can I get the user_id
?
Any help is greatly appreciated.
Recommended threads
- deno 2 Cloud random errors
we have big problems with the functions. although we do not change anything in the function, we have the following random behaviour: - no scope permissions erro...
- Invalid Origin Error – Need Help Registe...
Subject: Invalid Origin Error – Need Help Registering Platform Hi Appwrite Support <:appwrite:1156975611466764298> , I'm encountering an issue when trying to ...
- Database Double Requesting Error.
I am getting error for creating new document in an collection with new ID.unique() then too getting error of existing document. When button is pressed one docum...
