
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
- Unable to add permission when creating a...
I am creating a collection from a cloud function using the Appwrite Dart server SDK, and I want to add permissions so it can be accessed by users. I added code ...
- email verification error??
Hey, I'm trying email verificacion with this signup implementation using deep links on iOS, but when creating the account I get this exception: Exception: Erro...
- Resource limit on the free plan
I'm currently building a health-focused tech project as part of a student initiative, and I’ve been using Appwrite extensively for backend services. As part o...
